Class: NoticeComponentPreview

Inherits:
ViewComponent::Preview
  • Object
show all
Defined in:
lib/alveole/previews/notice_component_preview.rb

Instance Method Summary collapse

Instance Method Details

#defaultObject



4
5
6
# File 'lib/alveole/previews/notice_component_preview.rb', line 4

def default
  render(NoticeComponent.new(title: 'Example Alert', messages: ['Message 1', 'Message 2']))
end

#with_type_noticeObject



12
13
14
# File 'lib/alveole/previews/notice_component_preview.rb', line 12

def with_type_notice
  render(NoticeComponent.new(title: 'Example Notice', messages: ['Message 1', 'Message 2'], type: 'notice'))
end

#without_messagesObject



8
9
10
# File 'lib/alveole/previews/notice_component_preview.rb', line 8

def without_messages
  render(NoticeComponent.new(title: 'Example Notice'))
end