Bulmacomp

Gem Version Maintainability Rails Test Yard Docs

Bulmacomp is a ViewComponent collection for Bulma css framework.

Bulmacomp provide a "view component" for each bulma component:

and generic rails components

Installation

Add this line to your application's Gemfile:

gem "bulmacomp"

And then execute:

$ bundle

Or install it yourself as:

$ gem install bulmacomp

Usage

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

Contributing

Issues, forks and pull requests are welcomed

License

The gem is available as open source under the terms of the MIT License.