Class: NfgUi::Components::Patterns::Slats
- Inherits:
-
Base
- Object
- Bootstrap::Components::Base
- Base
- NfgUi::Components::Patterns::Slats
- Includes:
- Bootstrap::Utilities::Sizable, Traits::Size, Traits::Slats
- Defined in:
- lib/nfg_ui/components/patterns/slats.rb
Overview
Main slats
Constant Summary
Constants included from Traits::Slats
Constants included from Traits::Size
Constants included from Traits
Traits::REGISTERED_TRAITS, Traits::TRAIT_MODULES
Instance Attribute Summary
Attributes inherited from Bootstrap::Components::Base
#body, #options, #view_context
Instance Method Summary collapse
- #component_family ⇒ Object
-
#nowrap ⇒ Object
When :nowrap is true, the slat-item columns will not break into rows regardless of responsive page width.
-
#slat_actions ⇒ Object
Determine whether or not to accomodate a specific SlatActions size configuration by default, when slat_actions is not set it should have a nil presence.
Methods included from Traits::Slats
#nowrap_trait, #slat_actions_lg_trait, #slat_actions_none_trait, #slat_actions_sm_trait
Methods included from Traits::Size
#lg_trait, #md_trait, #sm_trait, #xl_trait
Methods included from Bootstrap::Utilities::Sizable
Methods included from Utilities::Traitable
Methods included from Utilities::Renderable
Methods included from Utilities::Describable
Methods inherited from Bootstrap::Components::Base
#data, #href, #html_options, #id, #initialize, #render, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#component_family ⇒ Object
13 14 15 |
# File 'lib/nfg_ui/components/patterns/slats.rb', line 13 def component_family :slats end |
#nowrap ⇒ Object
When :nowrap is true, the slat-item columns will not break into rows regardless of responsive page width
When false / not present slat item columns will break down into rows as expected in conventional responsivel webpage design.
24 25 26 |
# File 'lib/nfg_ui/components/patterns/slats.rb', line 24 def nowrap .fetch(:nowrap, false) end |
#slat_actions ⇒ Object
Determine whether or not to accomodate a specific SlatActions size configuration by default, when slat_actions is not set it should have a nil presence
Note: ‘nil` is different from the :none keyword
Options: :sm - account for a small SlatAction (icon only) :lg - account for a large SlatAction (Text & Icon) :none - Do not account for a SlatAction
Leaving ‘nil` for slat_actions will kick off default behavior for the Slats’ SlatAction which is a combination of :lg (for large screen) and :sm for small screen (where the slat action flexes) across screen sizes hiding and showing its text
46 47 48 |
# File 'lib/nfg_ui/components/patterns/slats.rb', line 46 def slat_actions [:slat_actions] || nil end |