Skip to content

Commit

Permalink
Shortcut.isDropdownOpen: Convert getState to state.
Browse files Browse the repository at this point in the history
  • Loading branch information
raineorshine committed Oct 18, 2024
1 parent 8c1a33b commit 9b340a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/@types/Shortcut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface Shortcut {
isActive?: (state: State) => boolean

/** When true, a small open dropdown indicator will be rendered beneath the icon. */
isDropdownOpen?: (getState: () => State) => boolean
isDropdownOpen?: (state: State) => boolean

/** A keyboard sequence to activate the shortcut. */
keyboard?: Key | string
Expand Down
2 changes: 1 addition & 1 deletion src/shortcuts/textColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const textColor: Shortcut = {
})
},
isActive: state => !!state.cursor,
isDropdownOpen: getState => !!getState().showColorPicker,
isDropdownOpen: state => !!state.showColorPicker,
}

export default textColor

0 comments on commit 9b340a2

Please sign in to comment.