an example of how to add typescript types to a wrapped component #433
codylindley
started this conversation in
General
Replies: 1 comment 1 reply
-
You can extend Kobalte's props like this: import { type SelectRootProps } from '@kobalte/core/select'
type SelectProps<T extends ValidComponent = "div"> =
SelectRootProps<T> & {
content?: string | JSX.Element
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If one wants to wrap a Kobalte component, can you show a clear example of how you would add types to the props that are passed through the wrapped component?
e.g.,
How should I type this Select component with Kobalte props:
The likley wrong way I did was:
This is much simpler with arkUI e.g.,
Beta Was this translation helpful? Give feedback.
All reactions