Repository navigation
Support the windstitch or similar syntax
#123
|
The import { w } from '@wind/react';
const Button = w.button('text-sm', {
variants: {
color: {
red: 'text-red-500',
blue: 'text-blue-500',
},
size: {
small: 'text-sm',
large: 'text-lg',
},
},
defaultVariants: {
size: 'small',
},
});
type ButtonProps = W.infer<typeof Button>;
render(<Button color="blue">)The <Button color='md:green lg:red' />
<Button mdColor='green' lgColor='red' />
<Button color={{ xs: 'green', sm: 'green', lg: 'red' }} />I really like |
Answered by
joe-bell
Mar 13, 2023
Replies: 2 comments
|
Here are two examples of creating something akin to the
Handling the ref is also important: Automatic conflict merging would be good too: |
0 replies
|
Appreciate you taking the time to write this up, but sorry, I don't plan to support this |
0 replies
Answer selected by
joe-bell
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Appreciate you taking the time to write this up, but sorry, I don't plan to support this
See the project FAQs