({
primary = false,
size = 'medium',
backgroundColor,
label,
...props
}: ButtonProps)
| 29 | } |
| 30 | |
| 31 | const 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 | |
| 51 | export default Button; |
nothing calls this directly
no outgoing calls
no test coverage detected