Class: Irelia::Button::Preview
- Inherits:
-
ComponentPreview
- Object
- ComponentPreview
- Irelia::Button::Preview
- Defined in:
- app/components/irelia/button/preview.rb
Colors collapse
Sizes collapse
Instance Method Summary collapse
- #default(color: :primary, size: :md) ⇒ Object
-
#link(color: :default, size: :md) ⇒ Object
Pass a URL to the button to render an anchor tag instead of a button.
- #only_icon ⇒ Object
- #with_icon ⇒ Object
- #with_right_icon ⇒ Object
Instance Method Details
#danger_color ⇒ Object
24 25 26 |
# File 'app/components/irelia/button/preview.rb', line 24 def danger_color (color: :danger) { "Button" } end |
#default(color: :primary, size: :md) ⇒ Object
7 8 9 |
# File 'app/components/irelia/button/preview.rb', line 7 def default(color: :primary, size: :md) (color:, size:) { "Default button" } end |
#default_size ⇒ Object
43 44 45 |
# File 'app/components/irelia/button/preview.rb', line 43 def default_size (size: :md) { "Button" } end |
#lg_size ⇒ Object
48 49 50 |
# File 'app/components/irelia/button/preview.rb', line 48 def lg_size (size: :lg) { "Large button" } end |
#link(color: :default, size: :md) ⇒ Object
Pass a URL to the button to render an anchor tag instead of a button.
76 77 78 |
# File 'app/components/irelia/button/preview.rb', line 76 def link(color: :default, size: :md) (url: "#") { "Link button" } end |
#only_icon ⇒ Object
70 71 72 |
# File 'app/components/irelia/button/preview.rb', line 70 def only_icon (icon: "fas fa-save", size: :md) end |
#primary_color ⇒ Object
14 15 16 |
# File 'app/components/irelia/button/preview.rb', line 14 def primary_color { "Button" } end |
#secondary_color ⇒ Object
19 20 21 |
# File 'app/components/irelia/button/preview.rb', line 19 def secondary_color (color: :secondary) { "Button" } end |
#sizes_xs ⇒ Object
33 34 35 |
# File 'app/components/irelia/button/preview.rb', line 33 def sizes_xs (size: :xs) { "Button" } end |
#sm_size ⇒ Object
38 39 40 |
# File 'app/components/irelia/button/preview.rb', line 38 def sm_size (size: :sm) { "Button" } end |
#with_icon ⇒ Object
60 61 62 |
# File 'app/components/irelia/button/preview.rb', line 60 def with_icon (icon: "fas fa-home", size: :md) { "Button with icon" } end |
#with_right_icon ⇒ Object
65 66 67 |
# File 'app/components/irelia/button/preview.rb', line 65 def with_right_icon (right_icon: "fas fa-arrow-right", size: :md) { "Button with icon" } end |
#xl_size ⇒ Object
53 54 55 |
# File 'app/components/irelia/button/preview.rb', line 53 def xl_size (size: :xl) { "Extra large button" } end |