Class: Pulse::Popover
- Inherits:
-
Component
- Object
- Component
- Pulse::Popover
- Defined in:
- app/components/pulse/popover.rb
Overview
Use Popover to bring attention to specific user interface elements,
typically to suggest an action or to guide users through a new experience.
By default, the popover renders with absolute positioning, meaning it should usually be wrapped in an element with a relative position in order to be positioned properly. To render the popover with relative positioning, use the relative property.
Constant Summary collapse
- CARET_DEFAULT =
:top- CARET_MAPPINGS =
{ CARET_DEFAULT => 'pulse-caret-top', :bottom => 'pulse-caret-bottom', :bottom_right => 'Popover-message--bottom-right', :bottom_left => 'Popover-message--bottom-left', :left => 'pulse-caret-left', :left_bottom => 'Popover-message--left-bottom', :left_top => 'Popover-message--left-top', :right => 'pulse-caret-right', :right_bottom => 'Popover-message--right-bottom', :right_top => 'Popover-message--right-top', :top_left => 'Popover-message--top-left', :top_right => 'Popover-message--top-right' }.freeze
- DEFAULT_HEADING_TAG =
:h4
Instance Method Summary collapse
- #body_component ⇒ Object
-
#initialize(**system_arguments) ⇒ Popover
constructor
A new instance of Popover.
- #render? ⇒ Boolean
Constructor Details
#initialize(**system_arguments) ⇒ Popover
Returns a new instance of Popover.
71 72 73 74 75 76 77 78 |
# File 'app/components/pulse/popover.rb', line 71 def initialize(**system_arguments) @system_arguments = deny_tag_argument(**system_arguments) @system_arguments[:tag] = :div @system_arguments[:classes] = merge_classes( 'pulse-relative pulse-z-10 pulse-w-64', system_arguments[:classes] ) end |