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

Commit

Permalink
Fix Flow nits in DraftEditorProps (#918)
Browse files Browse the repository at this point in the history
In one case it seems the return type was just incorrect. We also
clarified the comments for 'keyBindingFn' in order to avoid confusion -
previously due to some Flow issues we had almost changed this flow type
to be incorrect. See #894

Also fixes a hanging comma lint.
  • Loading branch information
flarnie authored Jan 27, 2017
1 parent f031cb9 commit 6344031
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/component/base/DraftEditorProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export type DraftEditorProps = {
blockRendererFn?: (block: ContentBlock) => ?Object,

// Function that returns a cx map corresponding to block-level styles.
blockStyleFn?: (type: number) => string,
blockStyleFn?: (block: ContentBlock) => string,

// A function that accepts a synthetic key event and returns
// the matching DraftEditorCommand constant, or null if no command should
// be invoked.
// the matching DraftEditorCommand constant, or a custom string,
// or null if no command should be invoked.
keyBindingFn: (e: SyntheticKeyboardEvent) => ?string,

// Set whether the `DraftEditor` component should be editable. Useful for
Expand Down Expand Up @@ -140,13 +140,13 @@ export type DraftEditorProps = {
// Provide a map of block rendering configurations. Each block type maps to
// an element tag and an optional react element wrapper. This configuration
// is used for both rendering and paste processing.
blockRenderMap: DraftBlockRenderMap
blockRenderMap: DraftBlockRenderMap,
};

export type DraftEditorDefaultProps = {
blockRenderMap: DraftBlockRenderMap,
blockRendererFn: (block: ContentBlock) => ?Object,
blockStyleFn: (type: number) => string,
blockStyleFn: (block: ContentBlock) => string,
keyBindingFn: (e: SyntheticKeyboardEvent) => ?string,
readOnly: boolean,
spellCheck: boolean,
Expand Down

0 comments on commit 6344031

Please sign in to comment.