I am trying to set the button themeColor attribute to a variable such as:
let themeColor: string = 'dark';
themeColor={themeColor}
but I get the error:
Type 'string' is not assignable to type '"base" | "dark" | "success" | "error" | "warning" | "info" | "primary" | "secondary" | "tertiary" | "light" | "inverse" | null | undefined'.ts(2322)
Button.d.ts(70, 5): The expected type comes from property 'themeColor' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<Button> & Pick<Pick<Readonly<ButtonProps>, "form" | ... 283 more ... | "onTransitionEndCapture"> & Pick<...> & Pick<...>, "form" | ... 279 more ... | "onTransitionEndCapture"> & InexactPartial<...> & InexactPartial<...>'
(property) themeColor?: "base" | "dark" | "success" | "error" | "warning" | "info" | "primary" | "secondary" | "tertiary" | "light" | "inverse" | null | undefined