Sha256: 9472241952c579d883ee3b88cac1b1615aac910c18a7162dba1a79834e4ac22a

Contents?: true

Size: 1.25 KB

Versions: 127

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true

module NfgUi
  module Components
    module Traits
      # Access to pre-designed theme traits
      module Theme
        COLOR_TRAITS = %i[primary
                          secondary
                          success
                          danger
                          warning
                          info
                          light
                          dark
                          white]

        TRAITS = [*COLOR_TRAITS,
                  :outlined].freeze



        def primary_trait
          options[:theme] = :primary
        end

        def secondary_trait
          options[:theme] = :secondary
        end

        def success_trait
          options[:theme] = :success
        end

        def danger_trait
          options[:theme] = :danger
        end

        def warning_trait
          options[:theme] = :warning
        end

        def info_trait
          options[:theme] = :info
        end

        def light_trait
          options[:theme] = :light
        end

        def dark_trait
          options[:theme] = :dark
        end

        def white_trait
          options[:theme] = :white
        end

        def outlined_trait
          options[:outlined] = true
        end
      end
    end
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
nfg_ui-0.9.26 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.25.1 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.25 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.24.3 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.24.2 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.24.1 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.24 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.23 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.22 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.21 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.20 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.19.1 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.19 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.18.3 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.18.2 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.18.1 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.18 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.17 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.16 lib/nfg_ui/components/traits/theme.rb
nfg_ui-0.9.15 lib/nfg_ui/components/traits/theme.rb