I'm just starting with Mantine and I've noticed that the props for buttons, ButtonProps, seems to only contain the mantine specific props. I'm looking to do a base component based on Button and I'd need to the full type in order to take in the correct props.
From what I can see a button has the following properties: (<C="button">(props: PolymorphicComponentProps<C, ButtonProps>), which lacks a certain panach. So for my button I have created a helper type which looks like this:
export type MantineButtonProps<C="button"> = PolymorphicComponentProps<C, ButtonProps>;
But while this is working I'm thinking that this cannot be the correct way, so I'm wondering how to fully type a Mantine Button?
#Typescript button props
2 messages · Page 1 of 1 (latest)