mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-21 06:41:39 -07:00
Refactor layout (#486)
* Refactor to move `<DatasetContainer>` out of layout * `<DatasetContainer>` is now in the methodology page. Starting the review there will help understand the motive for this change. * Fixed 404 page which seems way out of date. * Use row/col grid syntax
This commit is contained in:
parent
9a9d5fdf7f
commit
73a205dc48
7 changed files with 285 additions and 216 deletions
30
client/src/components/J40MainGridContainer.tsx
Normal file
30
client/src/components/J40MainGridContainer.tsx
Normal file
|
@ -0,0 +1,30 @@
|
|||
// Trussworks GridContainer won't allow it to span 100% of the page, so
|
||||
// this works around it and tries to hide the complexity in component
|
||||
import React, {ReactNode} from 'react';
|
||||
import {GridContainer} from '@trussworks/react-uswds';
|
||||
|
||||
interface ILayoutProps {
|
||||
children: ReactNode,
|
||||
fullWidth?: boolean,
|
||||
className?: string
|
||||
}
|
||||
|
||||
const J40MainGridContainer = ({
|
||||
children,
|
||||
fullWidth = false,
|
||||
className = 'j40-grid-container'}: ILayoutProps) => {
|
||||
return fullWidth ? (
|
||||
<div
|
||||
className={'j40-grid-container ' + className}>
|
||||
{children}
|
||||
</div>
|
||||
) : (
|
||||
<GridContainer
|
||||
containerSize={'desktop-lg'}
|
||||
className={'j40-grid-container ' + className}>
|
||||
{children}
|
||||
</GridContainer>
|
||||
);
|
||||
};
|
||||
|
||||
export default J40MainGridContainer;
|
Loading…
Add table
Add a link
Reference in a new issue