Download chakra-ui/packages/react/src/components/button/close-button.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 467 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/components/button/close-button.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/components/button/close-button.tsx
-
curl -L -o close-button.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/components/button/close-button.tsx
467 Bytes
| import * as React from "react" | |
| import { CloseIcon } from "../icons" | |
| import { IconButton, type IconButtonProps } from "./icon-button" | |
| export interface CloseButtonProps extends IconButtonProps {} | |
| export const CloseButton = React.forwardRef< | |
| HTMLButtonElement, | |
| CloseButtonProps | |
| >(function CloseButton(props, ref) { | |
| return ( | |
| <IconButton variant="ghost" aria-label="Close" ref={ref} {...props}> | |
| {props.children ?? <CloseIcon />} | |
| </IconButton> | |
| ) | |
| }) | |