-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathapp.tsx
More file actions
100 lines (93 loc) · 2.74 KB
/
app.tsx
File metadata and controls
100 lines (93 loc) · 2.74 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import * as React from 'react';
import { HashRouter as Router, NavLink, Route } from 'react-router-dom';
import styled from 'styled-components';
import {
ProviderApiPage,
ProviderAutoBootProps,
ProviderEventsPage,
ProviderPage,
UseIntercomPage,
UseIntercomTourPage,
UseIntercomWithCrossOrigin,
UseIntercomWithDelay,
UseIntercomWithLoadCallbacks,
} from './modules';
import { Page, Style } from './modules/common';
const Navigation = styled.ul`
padding: 0;
display: grid;
grid-template-columns: 1fr;
grid-row-gap: 1.75rem;
`;
const Link = styled(NavLink)`
text-decoration: none;
color: var(--dark);
&:visited,
&:active {
text-decoration: none;
}
> code {
font-size: 1rem;
}
`;
const App = () => {
return (
<>
<Style />
<Page
title="react-use-intercom"
description="Playground to showcase the functionalities of this package"
>
<Router>
<Route path="/provider" component={ProviderPage} />
<Route path="/providerEvents" component={ProviderEventsPage} />
<Route path="/providerApi" component={ProviderApiPage} />
<Route
path="/providerAutoBootProps"
component={ProviderAutoBootProps}
/>
<Route path="/useIntercom" component={UseIntercomPage} />
<Route path="/useIntercomTour" component={UseIntercomTourPage} />
<Route
path="/useIntercomWithCrossOrigin"
component={UseIntercomWithCrossOrigin}
/>
<Route
path="/useIntercomWithLoadCallbacks"
component={UseIntercomWithLoadCallbacks}
/>
<Route
path="/useIntercomWithTimeout"
component={UseIntercomWithDelay}
/>
<Route path="/" exact>
<Navigation>
<Link to="/provider">
<code>IntercomProvider</code>
</Link>
<Link to="/providerEvents">
<code>IntercomProvider with event callbacks</code>
</Link>
<Link to="/useIntercom">
<code>useIntercom</code>
</Link>
<Link to="/useIntercomTour">
<code>useIntercom with tour</code>
</Link>
<Link to="/useIntercomWithCrossOrigin">
<code>useIntercom with crossOrigin</code>
</Link>
<Link to="/useIntercomWithTimeout">
<code>useIntercom with delayed boot</code>
</Link>
<Link to="/useIntercomWithLoadCallbacks">
<code>useIntercom with load callbacks</code>
</Link>
</Navigation>
</Route>
</Router>
</Page>
</>
);
};
export default App;