-
Notifications
You must be signed in to change notification settings - Fork 180
/
customHtml.js
45 lines (41 loc) · 1023 Bytes
/
customHtml.js
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
import copyCodeBlock from '../src/copyCodeBlock';
export const opts = {
lang: 'xml',
colors: {
background: '#222',
textColor: '#fff',
attr: '#fab',
string: '#abe',
tag: '#afa',
name: '#ea8'
}
};
export const cssOverrides = {
cssOverrides: `
.container {
position: relative;
}
.displayCode {
max-width: 100%;
}
.copyButton {
padding: 0.5rem;
outline: none;
border: 1px solid #fff;
border-top: 0;
border-right: 0;
border-radius: 0 0 0 2px;
position: absolute;
top: 0;
right: 0;
font-size: 0.75rem;
}
`
};
export const customStyles = {
// no hljs
colors: { background: "#fa8072", textColor: "#4e2576"},
displayCodeWidth: "50%",
copyButtonWidth: "50%"
};
export const customHtml = (string, customOpts = opts) => copyCodeBlock(string, customOpts);