Class: Uistiti::Alpha::ButtonPreview

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

Colors collapse

Instance Method Summary collapse

Instance Method Details

#dangerObject



19
20
21
# File 'app/components/previews/uistiti/alpha/button_preview.rb', line 19

def danger
  render(Uistiti::Alpha::Button.new(color: :danger).with_content('Button'))
end

#playground(color: 'primary') ⇒ Object

Parameters:

  • color (defaults to: 'primary')

    select [primary, secondary, danger]



28
29
30
# File 'app/components/previews/uistiti/alpha/button_preview.rb', line 28

def playground(color: 'primary')
  render(Uistiti::Alpha::Button.new(color:).with_content('Button'))
end

#primaryObject



11
12
13
# File 'app/components/previews/uistiti/alpha/button_preview.rb', line 11

def primary
  render(Uistiti::Alpha::Button.new(color: :primary).with_content('Button'))
end

#secondaryObject



15
16
17
# File 'app/components/previews/uistiti/alpha/button_preview.rb', line 15

def secondary
  render(Uistiti::Alpha::Button.new(color: :secondary).with_content('Button'))
end