Class: BetterUi::General::Tabs::Component
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- BetterUi::General::Tabs::Component
- Defined in:
- app/components/better_ui/general/tabs/component.rb
Constant Summary collapse
- TABS_VARIANT =
{ pills: 'bg-gray-100 rounded-lg p-1', underline: 'border-b border-gray-200', bordered: 'border border-gray-200 rounded-lg', minimal: '' }.freeze
- TABS_THEME_DEFAULT =
{ default: 'text-gray-600', blue: 'text-blue-600', red: 'text-red-600', green: 'text-green-600', yellow: 'text-yellow-600', violet: 'text-violet-600', orange: 'text-orange-600', rose: 'text-rose-600', white: 'text-white' }.freeze
- TABS_SIZE =
{ small: 'text-sm', medium: 'text-base', large: 'text-lg' }.freeze
- TABS_ORIENTATION =
{ horizontal: 'flex-row', vertical: 'flex-col' }.freeze
Instance Method Summary collapse
-
#initialize(variant: :pills, theme: :default, size: :medium, orientation: :horizontal, navigation_classes: '', panels_classes: 'mt-4', **options) ⇒ Component
constructor
A new instance of Component.
Constructor Details
#initialize(variant: :pills, theme: :default, size: :medium, orientation: :horizontal, navigation_classes: '', panels_classes: 'mt-4', **options) ⇒ Component
Returns a new instance of Component.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'app/components/better_ui/general/tabs/component.rb', line 39 def initialize(variant: :pills, theme: :default, size: :medium, orientation: :horizontal, navigation_classes: '', panels_classes: 'mt-4', **) @variant = variant @theme = theme @size = size @orientation = orientation @navigation_classes = @panels_classes = panels_classes @options = validate_params end |