forked from patternfly/patternfly-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPageManagedSidebarClosedDemo.tsx
49 lines (46 loc) · 1.35 KB
/
PageManagedSidebarClosedDemo.tsx
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
38
39
40
41
42
43
44
45
46
47
48
49
import React from 'react';
import {
Page,
PageHeader,
PageHeaderTools,
PageSidebar,
PageSection,
PageSectionVariants
} from '@patternfly/react-core';
export class PageManagedSidebarClosedDemo extends React.Component {
static displayName = 'PageManagedSidebarClosedDemo';
componentDidMount() {
window.scrollTo(0, 0);
}
render() {
const logoProps = {
href: 'https://patternfly.org',
// eslint-disable-next-line no-console
onClick: () => console.log('clicked logo'),
target: '_blank'
};
const Header = (
<PageHeader
logo="Logo that's a <div>"
logoProps={logoProps}
headerTools={<PageHeaderTools>PageHeaderTools | Avatar</PageHeaderTools>}
showNavToggle
logoComponent={'div'}
/>
);
const Sidebar = <PageSidebar nav="Navigation" />;
return (
<Page
id="page-managed-sidebar-closed-demo"
header={Header}
sidebar={Sidebar}
isManagedSidebar
defaultManagedSidebarIsOpen={false}
>
<PageSection variant={PageSectionVariants.darker}>Section with darker background</PageSection>
<PageSection variant={PageSectionVariants.dark}>Section with dark background</PageSection>
<PageSection variant={PageSectionVariants.light}>Section with light background</PageSection>
</Page>
);
}
}