Download wp-calypso/client/layout/hosting-dashboard/top.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 609 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/hosting-dashboard/top.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/layout/hosting-dashboard/top.tsx
-
curl -L -o top.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/hosting-dashboard/top.tsx
609 Bytes
| import clsx from 'clsx'; | |
| import { Children, ReactNode } from 'react'; | |
| import LayoutNavigation from './nav'; | |
| type Props = { | |
| children: ReactNode; | |
| withNavigation?: boolean; | |
| }; | |
| export default function LayoutTop( { children, withNavigation }: Props ) { | |
| const navigation = Children.toArray( children ).find( | |
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | |
| ( child: any ) => child.type === LayoutNavigation | |
| ); | |
| return ( | |
| <div | |
| className={ clsx( 'hosting-dashboard-layout__top-wrapper', { | |
| 'has-navigation': withNavigation || !! navigation, | |
| } ) } | |
| > | |
| { children } | |
| </div> | |
| ); | |
| } | |