Spaces:
Running
Running
Download frontend/src/components/ui/Button.jsx from chesstb/explorer: direct link, hf CLI and curl.
- Browser
- Download file 563 Bytes
-
https://huggingface.co/spaces/chesstb/explorer/resolve/main/frontend/src/components/ui/Button.jsx
- Command line
-
hf download hf://spaces/chesstb/explorer/frontend/src/components/ui/Button.jsx
-
curl -L -o Button.jsx https://huggingface.co/spaces/chesstb/explorer/resolve/main/frontend/src/components/ui/Button.jsx
563 Bytes
| import Icon from './Icon.jsx'; | |
| export default function Button({ variant, compact, grow, iconOnly, icon, className = '', children, ...rest }) { | |
| const cls = [ | |
| 'btn', | |
| variant === 'primary' && 'btn--apply', | |
| compact && 'btn--compact', | |
| grow && 'btn--grow', | |
| iconOnly && 'btn--icon-only', | |
| className, | |
| ].filter(Boolean).join(' '); | |
| return ( | |
| <button type="button" className={cls} {...rest}> | |
| {icon && <Icon name={icon} className="btn__icon" />} | |
| {children} | |
| </button> | |
| ); | |
| } | |