MCPcopy Create free account
hub / github.com/adobe/react-spectrum / ToggleButton

Function ToggleButton

starters/docs/src/ToggleButton.tsx:18–29  ·  view source on GitHub ↗
(props: ToggleButtonProps)

Source from the content-addressed store, hash-verified

16}
17
18export function ToggleButton(props: ToggleButtonProps) {
19 return (
20 <RACToggleButton
21 {...props}
22 className="react-aria-ToggleButton button-base"
23 data-variant={props.variant || 'primary'}>
24 {composeRenderProps(props.children, children => (
25 <span>{children}</span>
26 ))}
27 </RACToggleButton>
28 );
29}

Callers

nothing calls this directly

Calls 1

composeRenderPropsFunction · 0.85

Tested by

no test coverage detected