Class: Pulse::NavLink
- Inherits:
-
Component
- Object
- Component
- Pulse::NavLink
- Defined in:
- app/components/pulse/nav_link.rb
Overview
Links in navbars
Constant Summary collapse
- DEFAULT_VARIANT =
:desktop- VARIANT_MAPPINGS =
{ desktop: 'pulse-px-3 pulse-py-2', mobile: 'pulse-px-3 pulse-py-2' }.freeze
- VARIANT_OPTIONS =
VARIANT_MAPPINGS.keys.freeze
Instance Method Summary collapse
-
#initialize(label:, path:, active_mode: :inclusive, variant: :desktop, **system_arguments) ⇒ NavLink
constructor
A new instance of NavLink.
Constructor Details
#initialize(label:, path:, active_mode: :inclusive, variant: :desktop, **system_arguments) ⇒ NavLink
Returns a new instance of NavLink.
15 16 17 18 19 20 21 22 23 |
# File 'app/components/pulse/nav_link.rb', line 15 def initialize(label:, path:, active_mode: :inclusive, variant: :desktop, **system_arguments) @label = label @path = path @active_mode = active_mode @variant = variant @system_arguments = system_arguments @system_arguments[:tag] ||= :div end |