-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLightBox.tsx
47 lines (37 loc) · 1.8 KB
/
LightBox.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
import React from 'react';
import ReactViewAdobe, { previewFile } from 'react-adobe-embed';
import { getClientId } from '../util';
export default function LightBoxEmbed() {
return (<section className="container section">
<div className="row ws-m">
<div className="col s12" style={{
height: 'calc(100vh - 420px)',
}}>
<ReactViewAdobe
url="https://raw.githubusercontent.com/ZipingL/dna/main/23andMe_Ancestry_Book.pdf"
clientId={
getClientId()
}
previewConfig={{
embedMode: "LIGHT_BOX",
}}
debug={true}
>
</ReactViewAdobe>
<button className="btn btn-primary" onClick={()=>{
previewFile({
url: "https://raw.githubusercontent.com/ZipingL/dna/main/23andMe_Ancestry_Book.pdf",
viewerConfig: {
embedMode: "LIGHT_BOX",
},
clientID: getClientId(),
divId: 'pdf-div',
_fileMeta:{
fileName: "23andMe_Ancestry_Book.pdf"
}
})
}}>Toggle Light Box View</button>
</div>
</div>
</section>)
}