@types/draft-js fix customStyleFn return type (#41276)

This commit is contained in:
Nikita Balikhin
2020-01-02 15:40:17 -08:00
committed by Ryan Cavanaugh
parent 4cd3d19955
commit 007889e18b
+3 -3
View File
@@ -98,9 +98,9 @@ declare namespace Draft {
// that will be rendered for matching ranges.
customStyleMap?: DraftStyleMap;
// Provide a function that will construct CSS style objects given inline
// style names.
customStyleFn?: (style: DraftInlineStyle, block: ContentBlock) => DraftStyleMap;
// Define a function to transform inline styles to CSS objects
// that are applied to spans of text.
customStyleFn?: (style: DraftInlineStyle, block: ContentBlock) => React.CSSProperties;
// A function that accepts a synthetic key event and returns
// the matching DraftEditorCommand constant, or null if no command should