1 | import { EditorState } from "draft-js";
|
2 | import { ComponentType, ReactNode } from "react";
|
3 |
|
4 | export interface DraftJsButtonTheme {
|
5 |
|
6 | active: string;
|
7 | button: string;
|
8 | buttonWrapper: string;
|
9 | }
|
10 |
|
11 | export interface DraftJsButtonProps {
|
12 | theme?: DraftJsButtonTheme;
|
13 | }
|
14 |
|
15 | export interface DraftJsBlockAlignmentButtonProps extends DraftJsButtonProps {
|
16 | alignment: string;
|
17 |
|
18 | setAlignment(alignment: string): void;
|
19 | }
|
20 |
|
21 | type DraftJsBlockAlignmentButtonType = ComponentType<
|
22 | DraftJsBlockAlignmentButtonProps
|
23 | >;
|
24 |
|
25 | export const AlignBlockCenterButton: DraftJsBlockAlignmentButtonType;
|
26 | export const AlignBlockDefaultButton: DraftJsBlockAlignmentButtonType;
|
27 | export const AlignBlockLeftButton: DraftJsBlockAlignmentButtonType;
|
28 | export const AlignBlockRightButton: DraftJsBlockAlignmentButtonType;
|
29 |
|
30 | export interface DraftJsStyleButtonProps extends DraftJsButtonProps {
|
31 | setEditorState(editorState: EditorState): void;
|
32 |
|
33 | getEditorState(): EditorState;
|
34 | }
|
35 |
|
36 | type DraftJsStyleButtonType = ComponentType<DraftJsStyleButtonProps>;
|
37 |
|
38 | export const createBlockStyleButton: (
|
39 | alignment: string,
|
40 | children: ReactNode
|
41 | ) => DraftJsStyleButtonType;
|
42 | export const createInlineStyleButton: (
|
43 | alignment: string,
|
44 | children: ReactNode
|
45 | ) => DraftJsStyleButtonType;
|
46 |
|
47 | export const BlockquoteButton: DraftJsStyleButtonType;
|
48 | export const BoldButton: DraftJsStyleButtonType;
|
49 | export const CodeBlockButton: DraftJsStyleButtonType;
|
50 | export const CodeButton: DraftJsStyleButtonType;
|
51 | export const HeadlineOneButton: DraftJsStyleButtonType;
|
52 | export const HeadlineThreeButton: DraftJsStyleButtonType;
|
53 | export const HeadlineTwoButton: DraftJsStyleButtonType;
|
54 | export const ItalicButton: DraftJsStyleButtonType;
|
55 | export const OrderedListButton: DraftJsStyleButtonType;
|
56 | export const SubButton: DraftJsStyleButtonType;
|
57 | export const SupButton: DraftJsStyleButtonType;
|
58 | export const UnderlineButton: DraftJsStyleButtonType;
|
59 | export const UnorderedListButton: DraftJsStyleButtonType;
|