Skip to content

Commit

Permalink
Merge pull request #442 from lidofinance/feature/ui-918-update-typing…
Browse files Browse the repository at this point in the history
…s-to-accept-react-nodes

Feature/UI 918 update typings to accept react nodes
  • Loading branch information
karinamaulitova authored Aug 4, 2023
2 parents 851c59e + b3ceedb commit da10b80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
ComponentPropsWithoutRef,
ForwardedRef,
forwardRef,
ReactNode,
RefObject,
} from 'react'
import { Text } from '../text'
Expand All @@ -12,7 +13,7 @@ import { Check } from '../icons'
export type CheckboxProps = ComponentPropsWithoutRef<'input'> & {
wrapperRef?: RefObject<HTMLLabelElement>
children?: never
label?: string
label?: ReactNode
}

export const Checkbox = forwardRef(
Expand Down
10 changes: 8 additions & 2 deletions packages/select/Option.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { ForwardedRef, MouseEvent, forwardRef, useCallback } from 'react'
import {
ForwardedRef,
MouseEvent,
forwardRef,
useCallback,
ReactNode,
} from 'react'
import { PopupMenuItem, PopupMenuItemProps } from '../popup-menu'

export type OptionValue = string | number
export type OptionHandleChange = (value: OptionValue) => void

export type OptionProps = Omit<PopupMenuItemProps, 'value' | 'children'> & {
value: OptionValue
children: string
children: ReactNode
onChange?: OptionHandleChange
}

Expand Down

0 comments on commit da10b80

Please sign in to comment.