We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
concepts
Targeting slots includes this description and sample code.
Let's say you want to apply a different border color to the checkbox control based on the size and the checked state. Here's how you would do it:
import { sva } from '../styled-system/css' const button = sva({ className: 'btn', slots: ['root', 'text'], base: { root: { bg: 'blue.500', _hover: { // v--- 🎯 this will target the `text` slot '& .btn__text': { color: 'white' } } } } })
However, this sample code doesn't match the description.
Compound variants above the Targeting slots also has same description and sample code has border color.
border color
import { sva } from '../styled-system/css' const checkbox = sva({ slots: ['root', 'control', 'label'], base: {...}, variants: { size: { sm: {...}, md: {...} }, isChecked: { true: { control: {}, label: {} } } }, compoundVariants: [ { size: 'sm', isChecked: true, css: { control: { borderColor: 'green-500' } } } ], defaultVariants: {...} })
I think that the description in Targeting slots should be deleted or change.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Subject
concepts
Description
Targeting slots includes this description and sample code.
However, this sample code doesn't match the description.
Compound variants above the Targeting slots also has same description and sample code has
border color
.I think that the description in Targeting slots should be deleted or change.
The text was updated successfully, but these errors were encountered: