Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Commit

Permalink
Strictify DraftEditorLeaf.react.js
Browse files Browse the repository at this point in the history
Summary:
happyflow

Didn't need to change any functionality too.

Reviewed By: gkz

Differential Revision: D19894146

fbshipit-source-id: 9d94eab312b979257aeb79a57e10c8590a42a63a
  • Loading branch information
mrkev authored and facebook-github-bot committed Feb 18, 2020
1 parent 0a4952c commit b4a1db9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/component/contents/DraftEditorLeaf.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
* @flow strict-local
* @emails oncall+draft_js
*/

Expand All @@ -23,15 +23,25 @@ const isHTMLBRElement = require('isHTMLBRElement');
const setDraftEditorSelection = require('setDraftEditorSelection')
.setDraftEditorSelection;

type CSSStyleObject = {
[property: string]: string | number,
};

type CustomStyleMap = {[name: string]: CSSStyleObject};
type CustomStyleFn = (
style: DraftInlineStyle,
block: BlockNodeRecord,
) => ?CSSStyleObject;

type Props = {
// The block that contains this leaf.
block: BlockNodeRecord,

// Mapping of style names to CSS declarations.
customStyleMap: Object,
customStyleMap: CustomStyleMap,

// Function that maps style names to CSS style objects.
customStyleFn: Function,
customStyleFn: CustomStyleFn,

// Whether to force the DOM selection after render.
forceSelection: boolean,
Expand Down

0 comments on commit b4a1db9

Please sign in to comment.