PhlexUI / phlex_ui

Ruby gem for Phlex UI Components
https://phlexui.com/
MIT License
115 stars 11 forks source link

Extract classes common across component variants #28

Closed dhnaranjo closed 1 month ago

dhnaranjo commented 6 months ago

I'd like it if the set of classes common across the variants of a component were pulled into something like a common_classes method. Take PhlexUI::Link, where each of the variants list of classes includes whitespace-nowrap, inline-flex, items-center, justify-center, rounded-md, font-medium, transition-colors, focus-visible:outline-none, focus-visible:ring-1, focus-visible:ring-ring, disabled:pointer-events-none, disabled:opacity-50. If these were broke up I could better see what the actual differences are.

dhnaranjo commented 6 months ago

I wonder how this could actually be maintained other than just like... as a policy as you write components. Some kinda custom cop? That seems like. lot. Maybe this isn't an issue but a like, discussion topic?