Class: AtomicView::Component

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
lib/atomic_view/component.rb

Instance Method Summary collapse

Instance Method Details

#class_namesObject



16
17
18
19
# File 'lib/atomic_view/component.rb', line 16

def class_names(...)
  classes = super
  TailwindMerge::Merger.new.merge(classes)
end

#icon(name, variant: Heroicons.configuration.variant, options: {}, path_options: {}) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/atomic_view/component.rb', line 7

def icon(name, variant: Heroicons.configuration.variant, options: {}, path_options: {})
  Heroicons::Icon.render(
    name: name,
    variant: variant,
    options: options,
    path_options: path_options
  )
end