I am using createTheme to custimize for my needs. i want to pass clearable prop to component and get that prop in createTheme. like this
<Select
clearable
label="Your favorite library"
placeholder="Pick value"
data={[
{
label: "One",
value: "0"
},
{
label: "Two",
value: "1"
},
{
label: "Three",
value: "2"
}
]}
value={value}
onChange={(value) => setValue(value)}
/>
and access to clearable prop inside createTheme like this
export const mantineTheme = createTheme({
components: {
Select: Select.extend({
classNames: (theme, props) => ({
section: cn(
"data-[position=right]-pointer-events-none",
props.value && props.clearable && "data-[position=right]:pointer-events-auto",
),
})
})
}
})