Problems styling new Checkbox component
See original GitHub issueFirst of all, thank you for putting together a set of form primitives, this is going to be very helpful 😃
I’ve been testing them out and so far I’ve had problems to style the Checkbox
component. According to the form docs, it should be possible to style them with theme.forms.checkbox
, but I’ve tried with all kind of properties (color
, background
borderColor
) and none seems to work.
The only way I’ve found to change the color is to use the sx
property:
import { Checkbox } from "@rebass/forms";
<Checkbox sx={{ color: "#00f"}}/>
However for some reason that’s only accepting raw values, and not colors defined in theme.colors
(such as primary
).
Not sure if there is something broken in the implementation of the Checkbox component, or it’s just lack of better documentation for it, in any case any guidance would be more than appreciated 😃
Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
4.05
should have the styled-components version now, you can import components from@rebass/forms/styled-components
Great! Now it works 😃 Thank you!