We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It'd be great to add this example from this article to the readme, it adds useful context for real world usage:
class ButtonComponent < ViewComponent::Base def initialize(color: :primary) @color = color end def css_classes ClassVariants.build( base: "inline-flex items-center rounded border-2 border-transparent font-medium text-sm text-white hover:text-white shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 transition-colors duration-300 p-1", variants: { color: { primary: "bg-grape-500 hover:bg-grape-600 text-white dark:bg-grape-400 dark:hover:bg-grape-500", } } ).render(color: @color) end end
The text was updated successfully, but these errors were encountered:
Send it in a PR @TeriyakiBomb. We'd love to feature it.
Sorry, something went wrong.
No branches or pull requests
It'd be great to add this example from this article to the readme, it adds useful context for real world usage:
The text was updated successfully, but these errors were encountered: