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

Function Button

examples/s2-rslib/src/Button.tsx:31–49  ·  view source on GitHub ↗
({
  primary = false,
  size = 'medium',
  backgroundColor,
  label,
  ...props
}: ButtonProps)

Source from the content-addressed store, hash-verified

29}
30
31const Button = ({
32 primary = false,
33 size = 'medium',
34 backgroundColor,
35 label,
36 ...props
37}: ButtonProps) => {
38 const mode = primary ? 'demo-button--primary' : 'demo-button--secondary';
39 return (
40 <div className={style({backgroundColor: 'cyan-400', color: 'magenta-400'})}>
41 <button
42 type="button"
43 className={['demo-button', `demo-button--${size}`, mode].join(' ')}
44 {...props}>
45 {label}
46 </button>
47 </div>
48 );
49};
50
51export default Button;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected