Class: NfgUi::Components::Elements::StepIndicator
- Inherits:
-
NavLink
- Object
- Bootstrap::Components::Base
- Bootstrap::Components::NavLink
- NavLink
- NfgUi::Components::Elements::StepIndicator
- Includes:
- Bootstrap::Utilities::Wrappable
- Defined in:
- lib/nfg_ui/components/elements/step_indicator.rb
Overview
Step doc coming soon
Constant Summary
Constants included from Traits::Remote
Constants included from Traits::Disable
Constants included from Traits::Active
Constants included from Traits
Traits::REGISTERED_TRAITS, Traits::TRAIT_MODULES
Instance Attribute Summary
Attributes included from Bootstrap::Utilities::Wrappable
Attributes included from Bootstrap::Utilities::Disableable
Attributes inherited from Bootstrap::Components::Base
#body, #options, #view_context
Instance Method Summary collapse
Methods included from Bootstrap::Utilities::Wrappable
Methods included from Traits::Remote
Methods included from Traits::Disable
Methods included from Traits::Active
Methods included from Utilities::Renderable
Methods included from Utilities::Methodable
Methods included from Utilities::Iconable
Methods included from Utilities::Describable
Methods included from Utilities::Traitable
Methods included from Bootstrap::Utilities::Modalable
Methods included from Bootstrap::Utilities::CollapseToggleable
Methods included from Bootstrap::Utilities::Collapsible
#collapse, #collapsed, #collapsible
Methods inherited from Bootstrap::Components::NavLink
Methods included from Bootstrap::Utilities::Remotable
Methods included from Bootstrap::Utilities::Disableable
Methods included from Bootstrap::Utilities::Activatable
Methods inherited from Bootstrap::Components::Base
#data, #href, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#component_family ⇒ Object
10 11 12 |
# File 'lib/nfg_ui/components/elements/step_indicator.rb', line 10 def component_family :steps end |
#render ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/nfg_ui/components/elements/step_indicator.rb', line 18 def render content_tag(as, ) do concat(content_tag(:div, class: 'step-indicator') { if icon NfgUi::Components::Foundations::Icon.new({ traits: [icon] }, view_context).render else step end }) concat(NfgUi::Components::Foundations::Typeface.new({ traits: [:muted], caption: (block_given? ? yield : body), class: 'mt-1 mb-0 step-text' }, view_context).render) if (block_given? || body.present?) end end |
#step ⇒ Object
14 15 16 |
# File 'lib/nfg_ui/components/elements/step_indicator.rb', line 14 def step .fetch(:step, nil) end |