ConditionalWrapper
ready
This page may be removed. Primer plans to move all Rails component documentation to Lookbook.
Description
Conditionally renders a component around the given content. If the given condition is true, the component will render around the content. If the condition is false, only the content is rendered.
Arguments
Name | Default | Description |
---|---|---|
condition | Boolean Whether or not to wrap the content in a component. | |
component | Class The component class to use as a wrapper, defaults to | |
base_component_arguments | Hash The arguments to pass to the component. |