Closed JohnDeved closed 2 years ago
there needs to be a line added here that sets a color variable and passes it to the Button component
can u take a screenshot to show how the issue looks like with your current configs. @JohnDeved and you can always change the text color of the button based on your need.
its seems you are only able to change text color of all buttons, not only the selected ones
good catch, will take a look at it
here is a snipped on how i used it @aboveyunhai
<RangeDatepicker
selectedDates={selectedDates}
onDateChange={setSelectedDates}
propsConfigs={{
dayOfMonthBtnProps: {
borderColor: 'primary.500',
selectedBg: 'ruefaGray.600',
// color: 'white',
_hover: { bg: 'ruefaGray.500' },
},
}}
/>
@JohnDeved it seems like we need a dedicated props
for selected button, let me come out a more general solution over the weekend so it's not limited to background but every styles you want to modify on the selected btn.
But the selectedBg
will be deprecated most likely.
@aboveyunhai may I give a suggestion?
<Button
// [...]
{...(selected || isInRange ? customBtnSelectedProps : customBtnProps)}
>
this way you have full control of all selected styles of the button
@aboveyunhai may I give a suggestion?
<Button // [...] {...(selected || isInRange ? customBtnSelectedProps : customBtnProps)} >
this way you have full control of all selected styles of the button
u got what I mean, just want to make sure we don't accidentally override something that should stay the same.
setting selectedBg to a dark color makes it impossible to read the selected text. and there seems to be no way to change selectedColor