Class: Fluxbit::SpeedDialComponent
- Includes:
- Config::SpeedDialComponent
- Defined in:
- app/components/fluxbit/speed_dial_component.rb
Overview
The ‘Fluxbit::SpeedDialComponent` is a component for rendering customizable Speed Dial floating action buttons.
Instance Method Summary collapse
-
#initialize(**props) ⇒ Fluxbit::SpeedDialComponent
constructor
Initializes the SpeedDial component with various customization options.
Methods inherited from Component
#add, #add_popover_or_tooltip, #anyicon, #element_name, #fx_id, #icon, #options, #popover?, #random_id, #remove_class, #remove_class_from_props, #render_popover_or_tooltip, #target, #tooltip?
Methods included from IconHelpers
#chevron_double_left, #chevron_double_right, #chevron_down, #chevron_left, #chevron_right, #chevron_up, #close_icon, #ellipsis_horizontal, #eye_icon, #eye_slash_icon, #plus_icon
Constructor Details
#initialize(**props) ⇒ Fluxbit::SpeedDialComponent
Initializes the SpeedDial component with various customization options.
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'app/components/fluxbit/speed_dial_component.rb', line 27 def initialize(**props) super @props = props @position = @props.delete(:position), collection: styles[:positions].keys, default: @@position @square = @props.delete(:square), default: @@square @text_outside = @props.delete(:text_outside), default: @@text_outside @trigger_icon = @props.delete(:trigger_icon) @props[:id] ||= "speed-dial-#{random_id}" add class: [ styles[:base], styles[:positions][@position] ], to: @props remove_class_from_props(@props) end |