-
Notifications
You must be signed in to change notification settings - Fork 337
Expand file tree
/
Copy pathTutorialNavigation.jsx
More file actions
49 lines (44 loc) · 1.2 KB
/
Copy pathTutorialNavigation.jsx
File metadata and controls
49 lines (44 loc) · 1.2 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
import React from 'react';
import { Link } from 'react-router-dom';
import styled from 'styled-components';
const Container = styled.div`
display: table;
text-align: center;
width: 100%;
`;
const Navigation = styled.div`
width: 33%;
display: table-cell;
`;
const linkStyle = {
padding: 10,
backgroundColor: "#3f51b5",
color: "white",
borderRadius: 5
};
const TutorialNavigation = ({ previousTutorial, nextTutorial }) => {
return (
<Container>
<Navigation>
{previousTutorial && (
<Link style={linkStyle} to={`${previousTutorial.route}`}>
← {previousTutorial.displayName}
</Link>
)}
</Navigation>
<Navigation>
<Link style={linkStyle} to="/">
Home
</Link>
</Navigation>
<Navigation>
{nextTutorial && (
<Link style={linkStyle} to={`${nextTutorial.route}`}>
{nextTutorial.displayName} →
</Link>
)}
</Navigation>
</Container>
);
};
export default TutorialNavigation;