-
Notifications
You must be signed in to change notification settings - Fork 126
/
Layout.jsx
37 lines (33 loc) · 972 Bytes
/
Layout.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from 'react';
import PropTypes from 'prop-types';
const Layout = ({ children, clsName = '', breadCrumbs = {} }) => {
const renderBreadCrumbs = () => {
const { text, href } = breadCrumbs;
if (text) return <a href={href}>{text}</a>;
return false;
};
return (
<>
<va-breadcrumbs uswds="false">
<a href="/">Home</a>
<a href="/education/">Education and training</a>
{renderBreadCrumbs()}
</va-breadcrumbs>
<section id={`education-letters-${clsName}`} className={clsName}>
<div className="usa-grid usa-grid-full">
<div className="usa-width-three-fourths">
<article className="usa-content vads-u-padding-bottom--0">
{children}
</article>
</div>
</div>
</section>
</>
);
};
Layout.propTypes = {
clsName: PropTypes.string,
children: PropTypes.object,
breadCrumbs: PropTypes.object,
};
export default Layout;