MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / Button

Function Button

sb-test/src/stories/Button.tsx:30–48  ·  view source on GitHub ↗
({
  primary = false,
  size = 'medium',
  backgroundColor,
  label,
  ...props
}: ButtonProps)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected