Class: BoxComponentPreview

Inherits:
ViewComponent::Preview
  • Object
show all
Defined in:
lib/cubit_components/previews/box_component_preview.rb

Instance Method Summary collapse

Instance Method Details

#defaultObject



4
5
6
# File 'lib/cubit_components/previews/box_component_preview.rb', line 4

def default
  render(CubitComponents::BoxComponent.new) { "Default Box" }
end

#with_utilitiesObject



8
9
10
11
# File 'lib/cubit_components/previews/box_component_preview.rb', line 8

def with_utilities
  render(CubitComponents::BoxComponent.new(classes: "p-4",
    vattrs: %w[gap-small text-center])) { "Preview" }
end