-
-
Notifications
You must be signed in to change notification settings - Fork 588
/
Styles.jsx
65 lines (54 loc) · 1.86 KB
/
Styles.jsx
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
import React from 'react';
import createInlineStyleButton from 'draft-js-buttons/lib/utils/createInlineStyleButton';
import createBlockStyleButton from 'draft-js-buttons/lib/utils/createBlockStyleButton';
import Icon from '../../components/theme/Icon/Icon';
import boldSVG from '../../icons/bold.svg';
import italicSVG from '../../icons/italic.svg';
import textSVG from '../../icons/text.svg';
import subtextSVG from '../../icons/subtext.svg';
import unorderedListSVG from '../../icons/list-bullet.svg';
import orderedListSVG from '../../icons/list-numbered.svg';
import blockquoteSVG from '../../icons/quote.svg';
import calloutSVG from '../../icons/megaphone.svg';
const BoldButton = createInlineStyleButton({
style: 'BOLD',
children: <Icon name={boldSVG} size="24px" />,
});
const ItalicButton = createInlineStyleButton({
style: 'ITALIC',
children: <Icon name={italicSVG} size="24px" />,
});
const HeadlineTwoButton = createBlockStyleButton({
blockType: 'header-two',
children: <Icon name={textSVG} size="24px" />,
});
const HeadlineThreeButton = createBlockStyleButton({
blockType: 'header-three',
children: <Icon name={subtextSVG} size="24px" />,
});
const UnorderedListButton = createBlockStyleButton({
blockType: 'unordered-list-item',
children: <Icon name={unorderedListSVG} size="24px" />,
});
const OrderedListButton = createBlockStyleButton({
blockType: 'ordered-list-item',
children: <Icon name={orderedListSVG} size="24px" />,
});
const BlockquoteButton = createBlockStyleButton({
blockType: 'blockquote',
children: <Icon name={blockquoteSVG} size="24px" />,
});
const CalloutButton = createBlockStyleButton({
blockType: 'callout',
children: <Icon name={calloutSVG} size="24px" />,
});
export {
BlockquoteButton,
BoldButton,
CalloutButton,
ItalicButton,
HeadlineTwoButton,
HeadlineThreeButton,
OrderedListButton,
UnorderedListButton,
};