Class: ShadcnPhlexcomponents::ToastActionTo
- Inherits:
-
ToastAction
- Object
- Phlex::HTML
- Base
- ToastAction
- ShadcnPhlexcomponents::ToastActionTo
- Defined in:
- lib/shadcn_phlexcomponents/components/toast.rb
Constant Summary
Constants inherited from Base
Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, Base::TAILWIND_MERGER
Instance Method Summary collapse
-
#initialize(name = nil, options = nil, html_options = nil) ⇒ ToastActionTo
constructor
A new instance of ToastActionTo.
- #view_template ⇒ Object
Methods inherited from ToastAction
Methods inherited from Base
#before_template, #convert_collection_hash_to_struct, #default_attributes, #find_as_child, #icon, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child
Constructor Details
#initialize(name = nil, options = nil, html_options = nil) ⇒ ToastActionTo
Returns a new instance of ToastActionTo.
155 156 157 158 159 |
# File 'lib/shadcn_phlexcomponents/components/toast.rb', line 155 def initialize(name = nil, = nil, = nil) @name = name = = end |
Instance Method Details
#view_template ⇒ Object
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/shadcn_phlexcomponents/components/toast.rb', line 161 def view_template(&) if block_given? = = @name end merge_default_attributes({}) ||= {} = mix(@attributes, ) [:form_class] = TAILWIND_MERGER.merge("inline-flex ml-auto #{@html_options[:form_class]}") if block_given? (, , &) else (@name, , ) end end |