Skip to content

Commit

Permalink
fix children property not being defined in React.FC type
Browse files Browse the repository at this point in the history
  • Loading branch information
dcastil authored and bdbch committed Apr 13, 2022
1 parent 55d458f commit a6fd827
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react/src/BubbleMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>

export type BubbleMenuProps = Omit<Optional<BubbleMenuPluginProps, 'pluginKey'>, 'element'> & {
className?: string,
children: React.ReactNode
}

export const BubbleMenu: React.FC<BubbleMenuProps> = props => {
export const BubbleMenu = (props: BubbleMenuProps) => {
const [element, setElement] = useState<HTMLDivElement | null>(null)

useEffect(() => {
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/FloatingMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>

export type FloatingMenuProps = Omit<Optional<FloatingMenuPluginProps, 'pluginKey'>, 'element'> & {
className?: string,
children: React.ReactNode
}

export const FloatingMenu: React.FC<FloatingMenuProps> = props => {
export const FloatingMenu = (props: FloatingMenuProps) => {
const [element, setElement] = useState<HTMLDivElement | null>(null)

useEffect(() => {
Expand Down

0 comments on commit a6fd827

Please sign in to comment.