Download chakra-ui/packages/react/src/components/button/icon-button.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 423 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/components/button/icon-button.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/components/button/icon-button.tsx
-
curl -L -o icon-button.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/chakra-ui/packages/react/src/components/button/icon-button.tsx
423 Bytes
| "use client" | |
| import { forwardRef } from "react" | |
| import { Button, type ButtonProps } from "./button" | |
| export interface IconButtonProps extends ButtonProps {} | |
| export const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>( | |
| function IconButton(props, ref) { | |
| return ( | |
| <Button | |
| px="0" | |
| py="0" | |
| _icon={{ fontSize: "1.2em" }} | |
| ref={ref} | |
| {...props} | |
| /> | |
| ) | |
| }, | |
| ) | |