Download wp-calypso/client/components/back-button/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 564 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/back-button/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/back-button/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/back-button/index.tsx
564 Bytes
| import { Button, Gridicon } from '@automattic/components'; | |
| import { useTranslate } from 'i18n-calypso'; | |
| import './style.scss'; | |
| type BackButtonProps = { | |
| onClick?: ( event?: React.MouseEvent< HTMLButtonElement > ) => void; | |
| }; | |
| const BackButton = ( props: BackButtonProps ) => { | |
| const translate = useTranslate(); | |
| return ( | |
| <div className="back-button"> | |
| <Button borderless compact { ...props }> | |
| <Gridicon icon="arrow-left" /> | |
| <span className="back-button__label">{ translate( 'Back' ) }</span> | |
| </Button> | |
| </div> | |
| ); | |
| }; | |
| export default BackButton; | |