Class: UiBibz::Ui::Core::Glyph
Overview
Create a glyph
This element is an extend of UiBibz::Ui::Core::Component.
Attributes
-
content
- Content of element -
options
- Options of element -
html_options
- Html Options of element
Options
You can add HTML attributes using the html_options
. You can
pass arguments in options attribute:
-
name
- String -
size
- Integer -
type
- Symbol -
state
- Symbol (:default
,:primary
,:info
,:warning
,:danger
)
Signatures
UiBibz::Ui::Core::Glyph.new content = nil, = nil, = nil,
&block
UiBibz::Ui::Core::Glyph.new( = nil, = nil) do
content
end
UiBibz::Ui::Core::Glyph.new content = {}
UiBibz::Ui::Core::Glyph.new content, = {}, = {}
Exemples
UiBibz::Ui::Core::Glyph.new('eye').render
UiBibz::Ui::Core::Glyph.new() do
name
end.render
UiBibz::Ui::Core::Glyph.new('eye', { size: 3, type: 'fw' }).render
UiBibz::Ui::Core::Glyph.new({ name: 'eye', size: 3, type: 'fw' }).render
Helper
glyph( = {})
glyph(name, = {}, = {})
glyph( = {}, = {}) do
name
end
Instance Attribute Summary
Attributes inherited from Component
Attributes inherited from Base
Instance Method Summary (collapse)
-
- (Glyph) initialize(content, options = nil, html_options = nil, &block)
constructor
See UiBibz::Ui::Core::Component.initialize.
-
- (Object) render
Render html tag.
Methods inherited from Component
#add_classes, #badge_html, #class_and_html_options, #glyph, #glyph_and_content_html, #glyph_with_space
Methods inherited from Base
Constructor Details
- (Glyph) initialize(content, options = nil, html_options = nil, &block)
See UiBibz::Ui::Core::Component.initialize
60 61 62 |
# File 'lib/ui_bibz/ui/core/glyph.rb', line 60 def initialize content, = nil, = nil, &block super end |
Instance Method Details
- (Object) render
Render html tag
65 66 67 |
# File 'lib/ui_bibz/ui/core/glyph.rb', line 65 def render content_tag :i, '', (classes) end |