-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathuseIntercomWithCrossOrigin.tsx
More file actions
44 lines (38 loc) · 916 Bytes
/
useIntercomWithCrossOrigin.tsx
File metadata and controls
44 lines (38 loc) · 916 Bytes
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
import * as React from 'react';
import { IntercomProvider } from 'react-use-intercom';
import styled from 'styled-components';
const Grid = styled.div`
display: grid;
grid-template-columns: repeat(1, 1fr);
width: 100%;
`;
const Item = styled.div`
display: grid;
grid-template-rows: min-content;
&::after {
content: '';
margin: 2rem 0 1.5rem;
border-bottom: 2px solid var(--grey);
width: 100%;
}
`;
const RawUseIntercomPage = () => {
return (
<Grid>
<Item>
<p>
Intercom will be initialized with{' '}
<code>crossOrigin: "anonymous"</code> (and autobooted)
</p>
</Item>
</Grid>
);
};
const UseIntercomWithCrossOriginPage = () => {
return (
<IntercomProvider appId="jcabc7e3" autoBoot crossOrigin="anonymous">
<RawUseIntercomPage />
</IntercomProvider>
);
};
export default UseIntercomWithCrossOriginPage;