forked from teachaccess/tutorial
-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathMasterLayout.js
More file actions
62 lines (57 loc) · 1.97 KB
/
MasterLayout.js
File metadata and controls
62 lines (57 loc) · 1.97 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
import ExtensionPoint from 'exerslide/components/ExtensionPoint';
import React from 'react';
import TOC from './components/TOC';
import Toolbar from './components/Toolbar';
/**
* The master layout specifies the overall layout of the page, such as
* the table of contents, a progress indicator and of course the slide itself.
* The current slide component is passed as child to it.
*
* Be default the master layout renders a table of contents, navigation buttons
* and the slide content:
*
* +----------------------------------------+
* |+---------+ +--------------------------+|
* || | | +-----------------------+||
* || | | | |||
* || | | | Slide |||
* || TOC | | | |||
* || | | +-----------------------+||
* || | | +-----------------------+||
* || | | | Toolbar |||
* || | | +-----------------------+||
* |+---------+ +--------------------------+|
* +----------------------------------------+
*
*/
export default function MasterLayout({className, children}) {
return (
<div id="exerslide-page" className={className}>
<TOC togglable={true} />
<ExtensionPoint tags={['main']}>
<div id="exerslide-main" className="flex-column">
<img style={{alignSelf: 'flex-end', width: 122, height: 51.64, margin: 10}} src="logo-teach-access.svg" alt="Teach Access Bridge" />
{children}
<Toolbar className="flex-item-fix" />
</div>
</ExtensionPoint>
</div>
);
}
MasterLayout.propTypes = {
/**
* CSS class names to add to the page.
*/
className: React.PropTypes.string,
/**
* The rendered slide is passed as child to the master layout.
*/
children: React.PropTypes.node,
};