Class: Irelia::Notification::Preview

Inherits:
ComponentPreview
  • Object
show all
Defined in:
app/components/irelia/notification/preview.rb

Instance Method Summary collapse

Instance Method Details

#alertObject



19
20
21
# File 'app/components/irelia/notification/preview.rb', line 19

def alert
  irelia_notification(variant: :alert) { "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
end

#defaultObject

You can specify the container class for the default template self.container_class = “w-1/2 border border-gray-300”



7
8
9
# File 'app/components/irelia/notification/preview.rb', line 7

def default
  irelia_notification { "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
end

#successObject



11
12
13
# File 'app/components/irelia/notification/preview.rb', line 11

def success
  irelia_notification(variant: :success) { "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
end

#warningObject



15
16
17
# File 'app/components/irelia/notification/preview.rb', line 15

def warning
  irelia_notification(variant: :warning) { "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }
end