Class: Shadcn::SeparatorComponent
- Inherits:
-
BaseComponent
- Object
- ViewComponent::Base
- BaseComponent
- Shadcn::SeparatorComponent
- Defined in:
- app/components/shadcn/separator_component.rb
Overview
Separator component for visually dividing content Matches shadcn/ui Separator component
Constant Summary collapse
- ORIENTATIONS =
{ horizontal: "h-[1px] w-full", vertical: "h-full w-[1px]" }.freeze
- BASE_CLASSES =
"shrink-0 bg-border"
Instance Attribute Summary
Attributes inherited from BaseComponent
#class_name, #data, #html_options
Instance Method Summary collapse
-
#initialize(orientation: :horizontal, decorative: false, **options) ⇒ SeparatorComponent
constructor
A new instance of SeparatorComponent.
Methods inherited from BaseComponent
Methods included from Rails::Helpers::ClassNameHelper
Constructor Details
#initialize(orientation: :horizontal, decorative: false, **options) ⇒ SeparatorComponent
Returns a new instance of SeparatorComponent.
26 27 28 29 30 |
# File 'app/components/shadcn/separator_component.rb', line 26 def initialize(orientation: :horizontal, decorative: false, **) super(**) @orientation = orientation.to_sym @decorative = decorative end |