Class: Uistiti::Alpha::NavbarPreview

Inherits:
ViewComponent::Preview
  • Object
show all
Defined in:
app/components/previews/uistiti/alpha/navbar_preview.rb

Instance Method Summary collapse

Instance Method Details

#playground(color: :primary) ⇒ Object

Parameters:

  • color (defaults to: :primary)

    select [primary, secondary]



12
13
14
15
16
17
18
19
20
21
# File 'app/components/previews/uistiti/alpha/navbar_preview.rb', line 12

def playground(color: :primary)
  render(Uistiti::Alpha::Navbar.new(color:)) do |navbar|
    navbar.{'UISTITI'}
    navbar.with_links([
      { path: '#', method: :get, color: 'inverse-base', text: 'Link 1' },
      { path: '#', method: :get, color: 'inverse-base', text: 'Link 2' },
      { path: '#', method: :get, color: 'inverse-base', text: 'Link 3' },
    ])
  end
end