Class: NfgUi::Components::Foundations::Typeface
- Inherits:
-
Base
- Object
- Bootstrap::Components::Base
- Base
- NfgUi::Components::Foundations::Typeface
- Includes:
- Bootstrap::Utilities::Themeable, Bootstrap::Utilities::Tooltipable, Bootstrap::Utilities::Wrappable, Traits::Muted, Traits::Theme, Traits::Typeface, Utilities::Iconable, Utilities::Titleable
- Defined in:
- lib/nfg_ui/components/foundations/typeface.rb
Overview
Typeface doc coming soon
Constant Summary
Constants included from Traits::Typeface
Constants included from Traits::Theme
Traits::Theme::COLOR_TRAITS, Traits::Theme::TRAITS
Constants included from Traits::Muted
Constants included from Traits
Traits::REGISTERED_TRAITS, Traits::TRAIT_MODULES
Instance Attribute Summary
Attributes inherited from Bootstrap::Components::Base
Instance Method Summary collapse
- #as ⇒ Object
- #body ⇒ Object
- #caption ⇒ Object
- #heading ⇒ Object
- #render ⇒ Object
- #subheading ⇒ Object
Methods included from Traits::Typeface
#body_trait, #caption_trait, #heading_trait, #subheading_trait, #title_trait, #truncate_trait
Methods included from Traits::Theme
#danger_trait, #dark_trait, #info_trait, #light_trait, #outlined_trait, #primary_trait, #secondary_trait, #success_trait, #warning_trait, #white_trait
Methods included from Traits::Muted
Methods included from Utilities::Titleable
Methods included from Utilities::Iconable
Methods included from Bootstrap::Utilities::Tooltipable
#data, #disabled_component_tooltip_wrapper_html_options, #html_options, #tooltip
Methods included from Bootstrap::Utilities::Disableable
Methods included from Bootstrap::Utilities::Themeable
Methods included from Bootstrap::Utilities::Wrappable
Methods included from Utilities::Traitable
Methods included from Utilities::Renderable
Methods included from Utilities::Describable
Methods inherited from Bootstrap::Components::Base
#component_family, #data, #href, #html_options, #id, #initialize, #style
Constructor Details
This class inherits a constructor from NfgUi::Bootstrap::Components::Base
Instance Method Details
#as ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/nfg_ui/components/foundations/typeface.rb', line 29 def as if heading heading_tag elsif subheading subheading_tag elsif title title_tag elsif else super end end |
#body ⇒ Object
55 56 57 |
# File 'lib/nfg_ui/components/foundations/typeface.rb', line 55 def body super || heading || title || || subheading end |
#caption ⇒ Object
51 52 53 |
# File 'lib/nfg_ui/components/foundations/typeface.rb', line 51 def .fetch(:caption, nil) end |
#heading ⇒ Object
43 44 45 |
# File 'lib/nfg_ui/components/foundations/typeface.rb', line 43 def heading .fetch(:heading, nil) end |
#render ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/nfg_ui/components/foundations/typeface.rb', line 19 def render super do if icon NfgUi::Components::Foundations::Icon.new({ icon: icon, text: body }, view_context).render else body end end end |
#subheading ⇒ Object
47 48 49 |
# File 'lib/nfg_ui/components/foundations/typeface.rb', line 47 def subheading .fetch(:subheading, nil) end |