UNPKG

@edtr-io/plugin-text

Version:
54 lines 1.65 kB
import styled, { ThemeProps as StyledThemeProps } from 'styled-components'; import { ButtonTheme, CheckboxTheme, InputTheme, OverlayTheme, TextareaTheme } from '.'; export { styled }; export interface EditorTheme { backgroundColor: string; color: string; primary: { color: string; background: string; }; secondary: { color: string; background: string; }; success: { color: string; background: string; }; info: { color: string; background: string; }; warning: { color: string; background: string; }; danger: { color: string; background: string; }; } export declare const defaultEditorTheme: EditorTheme; export interface EditorUiTheme { button: ButtonTheme; checkbox: CheckboxTheme; input: InputTheme; overlay: OverlayTheme; textarea: TextareaTheme; } export declare type EditorThemeProps = StyledThemeProps<{ editor: EditorTheme; editorUi: EditorUiTheme; }>; export declare function useEditorTheme(): { editor: EditorTheme; editorUi: EditorUiTheme; }; export declare function createEditorUiTheme<T>(createDefaultTheme: EditorUiThemeFactory<T>): (key: "button" | "input" | "textarea" | "checkbox" | "overlay", theme: { editor: EditorTheme; editorUi: EditorUiTheme; }) => T; export declare function useEditorUiTheme<T>(key: keyof EditorUiTheme, createDefaultTheme: EditorUiThemeFactory<T>): T; export declare type EditorUiThemeFactory<T> = (theme: EditorTheme) => T; //# sourceMappingURL=theme.d.ts.map