Module: NfgUi::Components::Traits::Theme

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

Instance Method Details

#danger_traitObject



35
36
37
# File 'lib/nfg_ui/components/traits/theme.rb', line 35

def danger_trait
  options[:theme] = :danger
end

#dark_traitObject



51
52
53
# File 'lib/nfg_ui/components/traits/theme.rb', line 51

def dark_trait
  options[:theme] = :dark
end

#info_traitObject



43
44
45
# File 'lib/nfg_ui/components/traits/theme.rb', line 43

def info_trait
  options[:theme] = :info
end

#light_traitObject



47
48
49
# File 'lib/nfg_ui/components/traits/theme.rb', line 47

def light_trait
  options[:theme] = :light
end

#outlined_traitObject



59
60
61
# File 'lib/nfg_ui/components/traits/theme.rb', line 59

def outlined_trait
  options[:outlined] = true
end

#primary_traitObject



23
24
25
# File 'lib/nfg_ui/components/traits/theme.rb', line 23

def primary_trait
  options[:theme] = :primary
end

#secondary_traitObject



27
28
29
# File 'lib/nfg_ui/components/traits/theme.rb', line 27

def secondary_trait
  options[:theme] = :secondary
end

#success_traitObject



31
32
33
# File 'lib/nfg_ui/components/traits/theme.rb', line 31

def success_trait
  options[:theme] = :success
end

#warning_traitObject



39
40
41
# File 'lib/nfg_ui/components/traits/theme.rb', line 39

def warning_trait
  options[:theme] = :warning
end

#white_traitObject



55
56
57
# File 'lib/nfg_ui/components/traits/theme.rb', line 55

def white_trait
  options[:theme] = :white
end