Project

bulmacomp

0.0
The project is in a healthy, maintained state
Collection of view components for bulma css framework
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 7.0
 Project Readme

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.