Class: Maglove::Widgets::Listitem

Inherits:
Base
  • Object
show all
Defined in:
lib/maglove/widgets/listitem.rb

Defined Under Namespace

Modules: Helpers

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#initialize, #typeloft_widget_options

Constructor Details

This class inherits a constructor from Maglove::Widgets::Base

Instance Method Details

#defaultsObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/maglove/widgets/listitem.rb', line 8

def defaults
  {
    background_color: "#18B545",
    text_color: "#FFFFFF",
    arrow_color: "#FFFFFF",
    size: "md",
    badge: nil,
    badge_color: "#FFFFFF",
    badge_background: "rgba(255, 255, 255, 0.25)",
    badge_width: "24px",
    title: "Title",
    subtitle: nil,
    subtitle_style: "normal",
    image_source: nil
  }
end

#identifierObject



4
5
6
# File 'lib/maglove/widgets/listitem.rb', line 4

def identifier
  "listitem"
end

#stylesObject



25
26
27
# File 'lib/maglove/widgets/listitem.rb', line 25

def styles
  style_string @options, :border_color, :background_color
end