Class: Uistiti::Alpha::FlexPreview

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

Instance Method Summary collapse

Instance Method Details

#playground(direction: 'some value', justify_content: 'some value', align_items: 'some value', gap: 'some value') ⇒ Object

Parameters:

  • direction (defaults to: 'some value')

    select [row, column]

  • gap (defaults to: 'some value')

    select [tiny, small, medium, large, xl, xxl]

  • justify_content (defaults to: 'some value')

    select [center, start, end, flex-start, flex-end, left, right, normal, space-between, space-around, space-evenly, stretch]

  • align_items (defaults to: 'some value')

    select [normal, stretch, center, start, end, flex-start, flex-end, self-start, self-end]



15
16
17
18
19
20
21
22
23
# File 'app/components/previews/uistiti/alpha/flex_preview.rb', line 15

def playground(direction: 'some value', justify_content: 'some value', align_items: 'some value', gap: 'some value')
  render(Uistiti::Alpha::Flex.new(direction:, justify_content:, align_items:, gap:)) do
    [
      (:p, 'Item 1'),
      (:p, 'Item 2'),
      (:p, 'Item 3')
    ].join.html_safe
  end
end