Module: StyleGuideHelper
- Defined in:
- app/helpers/style_guide_helper.rb
Overview
Helper methods for the style guide
Instance Method Summary collapse
-
#example_with_code(title, code = nil, options = {}) { ... } ⇒ String
Render a component example with preview and code.
Instance Method Details
#example_with_code(title, code = nil, options = {}) { ... } ⇒ String
Render a component example with preview and code
11 12 13 14 15 |
# File 'app/helpers/style_guide_helper.rb', line 11 def example_with_code(title, code = nil, = {}, &block) content_tag :div, class: "code-example-wrapper #{[:wrapper_class]}" do preview_section(title, &block) + code_section(code) end end |