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

NameDefaultDescription
condition
Boolean

Whether or not to wrap the content in a component.

component
Class

The component class to use as a wrapper, defaults to Primer::BaseComponent

base_component_arguments
Hash

The arguments to pass to the component.