Skip to content

Commit

Permalink
chore: replace ReactNode children by PropsWithChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
verekia committed May 4, 2024
1 parent 9f33f6c commit ff52f04
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/react/src/JoystickArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { forwardRef, useEffect, useRef } from 'react'
import { mountJoystickArea } from '@manapotion/core'

import type { JoystickAreaProps } from '@manapotion/core'
import type { DetailedHTMLProps, ForwardedRef, HTMLAttributes, ReactNode } from 'react'
import type { DetailedHTMLProps, ForwardedRef, HTMLAttributes, PropsWithChildren } from 'react'

// react-merge-refs v2.1.1
function mergeRefs<T = unknown>(
Expand All @@ -20,10 +20,11 @@ function mergeRefs<T = unknown>(
}
}

type JoystickAreaBaseProps = Omit<JoystickAreaProps, 'element'> & {
children?: ReactNode
containerProps: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
}
type JoystickAreaBaseProps = PropsWithChildren<
Omit<JoystickAreaProps, 'element'> & {
containerProps: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
}
>

const JoystickAreaBase = (
{
Expand Down

0 comments on commit ff52f04

Please sign in to comment.