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

Function Button

starters/docs/src/Button.tsx:19–33  ·  view source on GitHub ↗
(props: ButtonProps)

Source from the content-addressed store, hash-verified

17}
18
19export function Button(props: ButtonProps) {
20 return (
21 <RACButton
22 {...props}
23 className="react-aria-Button button-base"
24 data-variant={props.variant || 'primary'}>
25 {composeRenderProps(props.children, (children, {isPending}) => (
26 <>
27 {!isPending && children}
28 {isPending && <ProgressCircle aria-label="Saving..." isIndeterminate />}
29 </>
30 ))}
31 </RACButton>
32 );
33}

Callers

nothing calls this directly

Calls 1

composeRenderPropsFunction · 0.85

Tested by

no test coverage detected