Download wp-calypso/client/dashboard/components/header-bar/index.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/components/header-bar/index.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/dashboard/components/header-bar/index.tsx
-
curl -L -o index.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/dashboard/components/header-bar/index.tsx
638 Bytes
| import { __experimentalHStack as HStack } from '@wordpress/components'; | |
| import './style.scss'; | |
| function Header( { as = 'div', children }: { as?: 'div' | 'header'; children?: React.ReactNode } ) { | |
| return ( | |
| <HStack | |
| as={ as } | |
| className="dashboard-header-bar" | |
| alignment="left" | |
| spacing={ 2 } | |
| justify="flex-start" | |
| > | |
| { children } | |
| </HStack> | |
| ); | |
| } | |
| Header.Title = function HeaderBarTitle( { children }: { children: React.ReactNode } ) { | |
| return ( | |
| <HStack | |
| style={ { width: 'auto', flexGrow: 1, flexShrink: 0 } } | |
| className="dashboard-header-bar-title" | |
| > | |
| { children } | |
| </HStack> | |
| ); | |
| }; | |
| export default Header; | |