Bulmacomp is a ViewComponent collection for Bulma css framework.
Bulmacomp provide a "view component" for each bulma component:
- Breadcrumb - Bulmacomp::BreadcrumbComponent
- Card - Bulmacomp::CardComponent
- Dropdown - Bulmacomp::DropdownComponent
- Menu - Bulmacomp::MenuComponent
- Message - Bulmacomp::MessageComponent
- Modal - Bulmacomp::ModalCompoent
- Navbar - Bulmacomp::NavbarCompoent
- Pagination - Bulmacomp::PaginationComponent
- Panel - Bulmacomp::PanelComponent
- Tabs - Bulmacomp::TabsComponent
and generic rails components
Add this line to your application's Gemfile:
gem "bulmacomp"
And then execute:
$ bundle
Or install it yourself as:
$ gem install bulmacomp
Bulmacomp provide standard view components. You can simply render of a new instance of the components with your parameters:
render Bulmacomp::MessageComponent.new(title: 'example', close: true, close_options: {id: 'close'}) do
Some content
end
returns
<article class="message">
<div class="message-header">
<p>Example</p>
<button id="close" class="delete" aria-label="delete" data-close='message'></button>
</div>
<div class="message-body">Some content</div>
</article>
You can get more details from View Component site and Bulmacom documentation
Issues, forks and pull requests are welcomed
The gem is available as open source under the terms of the MIT License.