Download wp-calypso/apps/odyssey-stats/src/components/layout.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 849 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/odyssey-stats/src/components/layout.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/apps/odyssey-stats/src/components/layout.tsx
-
curl -L -o layout.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/apps/odyssey-stats/src/components/layout.tsx
849 Bytes
| import clsx from 'clsx'; | |
| import AsyncLoad from 'calypso/components/async-load'; | |
| interface LayoutProps { | |
| sectionGroup: string; | |
| sectionName: string; | |
| primary: React.ReactNode; | |
| secondary: React.ReactNode; | |
| } | |
| export default function Layout( { sectionGroup, sectionName, primary, secondary }: LayoutProps ) { | |
| const sectionClass = clsx( 'layout', { | |
| [ 'is-group-' + sectionGroup ]: sectionGroup, | |
| [ 'is-section-' + sectionName ]: sectionName, | |
| } ); | |
| return ( | |
| <div className={ sectionClass }> | |
| <div id="content" className="layout__content"> | |
| <AsyncLoad require="calypso/components/global-notices" placeholder={ null } id="notices" /> | |
| <div id="secondary" className="layout__secondary" role="navigation"> | |
| { secondary } | |
| </div> | |
| <div id="primary" className="layout__primary"> | |
| { primary } | |
| </div> | |
| </div> | |
| </div> | |
| ); | |
| } | |