Compose
Composes immediate child with its props and child own props. Used to implement Shoreline composition
function Button({ asChild, ...props }) { const Composition = asChild ? Compose : "button"; return <Composition {...props} />; }
Parameters
props
- Type:
@vtex/shoreline-components.ComposeProps & @types/react.React.RefAttributes<any>
Props
children
(optional)
- Type:
@types/react.React.ReactNode