I would like to have a dynamic Array<string> that then makes a dynamic Object with the key/property from the array's values. (using for a prop usage in reactjs typescript)
here's an example code:
interface Props {
buttons: Array<string>;
buttonProps?: { [key: string]: string }; //want key here to correspond with values of buttons
}
I am guessing you use generics here but I am unsure on how to proceed with that.