Class: Voom::Presenters::DSL::Components::Content
- Includes:
- Mixins::Attaches, Mixins::Avatar, Mixins::Chipset, Mixins::Common, Mixins::DateTimeFields, Mixins::Dialogs, Mixins::FileInputs, Mixins::Icons, Mixins::Padding, Mixins::Progress, Mixins::Selects, Mixins::Sliders, Mixins::Snackbars, Mixins::Steppers, Mixins::TextFields
- Defined in:
- lib/voom/presenters/dsl/components/content.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#background_color ⇒ Object
readonly
Returns the value of attribute background_color.
-
#components ⇒ Object
readonly
Returns the value of attribute components.
-
#float ⇒ Object
readonly
Returns the value of attribute float.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#hidden ⇒ Object
readonly
Returns the value of attribute hidden.
-
#inline ⇒ Object
readonly
Returns the value of attribute inline.
-
#padding ⇒ Object
readonly
Returns the value of attribute padding.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#shows_errors ⇒ Object
readonly
Returns the value of attribute shows_errors.
-
#text_align ⇒ Object
readonly
Returns the value of attribute text_align.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Attributes inherited from EventBase
Attributes included from Mixins::Event
Attributes inherited from Base
#attributes, #css_class, #draggable, #drop_zone, #id, #tag, #type
Instance Method Summary collapse
-
#initialize(**attribs_, &block) ⇒ Content
constructor
A new instance of Content.
Methods included from Mixins::Padding
#coerce_padding, #validate_padding
Methods included from Mixins::Progress
Methods included from Mixins::Avatar
Methods included from Mixins::FileInputs
Methods included from Mixins::Dialogs
Methods included from Mixins::Icons
Methods included from Mixins::Chipset
Methods included from Mixins::Append
Methods included from Mixins::Sliders
Methods included from Mixins::Steppers
Methods included from Mixins::Snackbars
Methods included from Mixins::Selects
Methods included from Mixins::DateTimeFields
#date_field, #datetime_field, #time_field
Methods included from Mixins::TextFields
#hidden_field, #number_field, #rich_text_area, #text_area, #text_field
Methods included from Mixins::Attaches
Methods included from Namespace
Methods included from Mixins::Common
#avatar, #badge, #card, #form, #list, #table, #unordered_list
Methods included from Mixins::Tables
Methods included from Mixins::ImageLists
Methods included from Mixins::Images
Methods included from Mixins::TabBars
Methods included from Mixins::Menus
Methods included from Mixins::Content
Methods included from Mixins::ExpansionPanels
Methods included from Mixins::Buttons
Methods included from Mixins::Grids
Methods included from Mixins::Typography
#blank, #body, #body2, #caption, #headline, #headline1, #headline2, #headline3, #headline4, #headline5, #headline6, #link, #overline, #page_title, #separator, #subtitle, #subtitle2, #text, #title
Methods included from Mixins::Toggles
#checkbox, #icon_toggle, #radio_button, #switch
Methods included from Mixins::Event
Methods inherited from Base
Methods included from Pluggable
#include_plugins, #plugin, #plugin_module
Methods included from Mixins::YieldTo
Methods included from Serializer
Methods included from Lockable
Constructor Details
#initialize(**attribs_, &block) ⇒ Content
Returns a new instance of Content.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 33 def initialize(**attribs_, &block) super(type: :content, **attribs_, &block) @components = [] @hidden = attribs.delete(:hidden){false} @float = attribs.delete(:float){false} @width = attribs.delete(:width){nil} @height = attribs.delete(:height){nil} @shows_errors = attribs.delete(:shows_errors){false} @position = Array(attribs.delete(:position)).compact @text_align = attribs.delete(:text_align){'left'} padding = attribs.delete(:padding) {nil} @padding = validate_padding(coerce_padding(padding)).uniq if padding != nil @inline = attribs.delete(:inline){false} @background_color = attribs.delete(:background_color) end |
Instance Attribute Details
#background_color ⇒ Object (readonly)
Returns the value of attribute background_color.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def background_color @background_color end |
#components ⇒ Object (readonly)
Returns the value of attribute components.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def components @components end |
#float ⇒ Object (readonly)
Returns the value of attribute float.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def float @float end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def height @height end |
#hidden ⇒ Object (readonly)
Returns the value of attribute hidden.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def hidden @hidden end |
#inline ⇒ Object (readonly)
Returns the value of attribute inline.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def inline @inline end |
#padding ⇒ Object (readonly)
Returns the value of attribute padding.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def padding @padding end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def position @position end |
#shows_errors ⇒ Object (readonly)
Returns the value of attribute shows_errors.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def shows_errors @shows_errors end |
#text_align ⇒ Object (readonly)
Returns the value of attribute text_align.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def text_align @text_align end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
21 22 23 |
# File 'lib/voom/presenters/dsl/components/content.rb', line 21 def width @width end |