module Molecular
Build reusable, tweakable UI elements out of atomic-CSS classes
Constants
- VERSION
Public Instance Methods
compound(atoms)
click to toggle source
@example
Button = Compound.new(bg: 'bg-blue', color: 'white') <button class="<%= Button %>">A blue button</button> <button class="<%= Button.(bg: 'bg-red') %>">A red button</button>
@param [Hash] atoms:
- values are the CSS class names that get chained - keys define the API you'll use to apply alternate classes @return [Molecular::Compound]
# File lib/molecular.rb, line 16 def compound(atoms) Compound.new(atoms) end