diff options
Diffstat (limited to 'spec/components/previews/pajamas/alert_component_preview.rb')
-rw-r--r-- | spec/components/previews/pajamas/alert_component_preview.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/components/previews/pajamas/alert_component_preview.rb b/spec/components/previews/pajamas/alert_component_preview.rb index 9a6b77715f5..e1889032c8b 100644 --- a/spec/components/previews/pajamas/alert_component_preview.rb +++ b/spec/components/previews/pajamas/alert_component_preview.rb @@ -1,12 +1,13 @@ # frozen_string_literal: true module Pajamas class AlertComponentPreview < ViewComponent::Preview + # @param title text # @param body text # @param dismissible toggle # @param variant select [info, warning, success, danger, tip] - def default(body: nil, dismissible: true, variant: :info) + def default(title: "Alert title (optional)", body: "Alert message goes here.", dismissible: true, variant: :info) render(Pajamas::AlertComponent.new( - title: "Title", + title: title, dismissible: dismissible, variant: variant.to_sym )) do |c| |