Class: ContentBlockComponentPreview
- Inherits:
-
ViewComponent::Preview
- Object
- ViewComponent::Preview
- ContentBlockComponentPreview
- Defined in:
- lib/cubit_components/previews/content_block_component_preview.rb
Instance Method Summary collapse
Instance Method Details
#default ⇒ Object
2 3 4 5 6 |
# File 'lib/cubit_components/previews/content_block_component_preview.rb', line 2 def default render(CubitComponents::ContentBlockComponent.new(vattrs: %w[max-w-sm])) do tag.p("This content is constrained by the max-width and centered.") end end |
#with_extra_classes ⇒ Object
8 9 10 11 12 |
# File 'lib/cubit_components/previews/content_block_component_preview.rb', line 8 def with_extra_classes render(CubitComponents::ContentBlockComponent.new(classes: "bg-gray-100 p-4")) do tag.p("Content block with extra background and padding.") end end |