Module: BulmaX::Shared::GlobalOptions

Included in:
BaseComponent
Defined in:
lib/bulma_x/shared/global_options.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



24
# File 'lib/bulma_x/shared/global_options.rb', line 24

def self.included(base) = base.extend(ClassMethods)

Instance Method Details

#global_attributesObject



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/bulma_x/shared/global_options.rb', line 26

def global_attributes
  {
    accesskey: @accesskey,
    draggable: @draggable,
    hidden: @hidden,
    id: @id,
    lang: @lang,
    role: @role,
    spellcheck: @spellcheck,
    tabindex: @tabindex,
    title: @title
  }
end

#global_classesObject



40
41
42
43
44
45
46
# File 'lib/bulma_x/shared/global_options.rb', line 40

def global_classes
  [
    @fullwidth && 'is-fullwidth',
    @background_color && "has-background-#{@background_color}",
    *@extra_classes
  ]
end