Class: Ui::Component
- Inherits:
-
Cell::ViewModel
- Object
- Cell::ViewModel
- Ui::Component
show all
- Includes:
- ActionView::Context, ActionView::Helpers::FormHelper, ActionView::Helpers::TagHelper, Layout::External
- Defined in:
- lib/ui/component.rb
Direct Known Subclasses
Breadcrumbs, Breadcrumbs::Breadcrumb, Buttons::Base, Card, Collapse, Ui::Collapse::Panel, DescriptiveList, DescriptiveList::Item, Dropdown, Empty, List, List::Item, Menu, Menu::Item, Notification, PageHeader, Pagination, Pagination::PageLink, Pagination::Window, Step, Steps, Table, Table::Header, Table::Row, Table::Select, Table::Select::Many, Table::Select::One, Table::SelectAll, Table::Sort, Tooltip, Wizard, Wizard::Content
Constant Summary
collapse
- VIEWPATH =
Pathname.new(__FILE__).join("../..")
Instance Method Summary
collapse
Instance Method Details
#capture(*args) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/ui/component.rb', line 11
def capture(*args)
content = yield(*args)
if content.is_a?(String)
content.html_safe
else
content
end
end
|
#icon(style) ⇒ Object
24
25
26
|
# File 'lib/ui/component.rb', line 24
def icon(style)
content_tag(:i, nil, class: style)
end
|
#render_group(items) ⇒ Object
20
21
22
|
# File 'lib/ui/component.rb', line 20
def render_group(items)
items.compact.join(' ').html_safe
end
|