Module: NfgUi::Components::Traits::Theme
- Included in:
- Elements::Alert, Elements::Badge, Elements::Button, Elements::DropdownItem, Elements::DropdownToggle, Elements::ProgressBar, Foundations::Icon, Foundations::Typeface, Patterns::Card, Patterns::Dropdown, Patterns::Navbar, Patterns::Progress, Utilities::Patches::IntegratedSlatAction
- Defined in:
- lib/nfg_ui/components/traits/theme.rb
Overview
Access to pre-designed theme traits
Constant Summary collapse
- COLOR_TRAITS =
%i[primary secondary success danger warning info light dark white]
- TRAITS =
[*COLOR_TRAITS, :outlined].freeze
Instance Method Summary collapse
- #danger_trait ⇒ Object
- #dark_trait ⇒ Object
- #info_trait ⇒ Object
- #light_trait ⇒ Object
- #outlined_trait ⇒ Object
- #primary_trait ⇒ Object
- #secondary_trait ⇒ Object
- #success_trait ⇒ Object
- #warning_trait ⇒ Object
- #white_trait ⇒ Object
Instance Method Details
#danger_trait ⇒ Object
35 36 37 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 35 def danger_trait [:theme] = :danger end |
#dark_trait ⇒ Object
51 52 53 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 51 def dark_trait [:theme] = :dark end |
#info_trait ⇒ Object
43 44 45 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 43 def info_trait [:theme] = :info end |
#light_trait ⇒ Object
47 48 49 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 47 def light_trait [:theme] = :light end |
#outlined_trait ⇒ Object
59 60 61 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 59 def outlined_trait [:outlined] = true end |
#primary_trait ⇒ Object
23 24 25 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 23 def primary_trait [:theme] = :primary end |
#secondary_trait ⇒ Object
27 28 29 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 27 def secondary_trait [:theme] = :secondary end |
#success_trait ⇒ Object
31 32 33 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 31 def success_trait [:theme] = :success end |
#warning_trait ⇒ Object
39 40 41 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 39 def warning_trait [:theme] = :warning end |
#white_trait ⇒ Object
55 56 57 |
# File 'lib/nfg_ui/components/traits/theme.rb', line 55 def white_trait [:theme] = :white end |