Module: CubitComponents::Previews::PreviewHelper
- Defined in:
- lib/cubit_components/previews/preview_helper.rb
Instance Method Summary collapse
-
#documentation_link(component_name) ⇒ Object
Returns a documentation link for the component.
-
#render_documentation(component_name) ⇒ Object
Standard documentation render for previews.
Instance Method Details
#documentation_link(component_name) ⇒ Object
Returns a documentation link for the component.
5 6 7 |
# File 'lib/cubit_components/previews/preview_helper.rb', line 5 def documentation_link(component_name) "https://your.documentation.url/#{component_name}" end |
#render_documentation(component_name) ⇒ Object
Standard documentation render for previews
10 11 12 |
# File 'lib/cubit_components/previews/preview_helper.rb', line 10 def render_documentation(component_name) render plain: "See documentation: #{documentation_link(component_name)}" end |