How to get PropTypes of a component? #125
Answered
by
jrgarciadev
malikKartik
asked this question in
Help
-
I want to make a wrapper component around a NextUI component is there a way to extent nextUI's component propTypes to my custom wrapper component? |
Beta Was this translation helpful? Give feedback.
Answered by
jrgarciadev
Nov 29, 2021
Replies: 1 comment
-
Hey @malikKartik, sorry for the delay, you can build your own NextUI components wrapper doing this -> import React from 'react'
import { Button } from '@nextui-org/react'
const MyButtonWrapper: React.FC<React.ComponentProps<typeof Button> = (props) => {
return (
<div className="button-wrapper">
<Button>Action</Button>
</div>
)
}
export default MyButtonWrapper; |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jrgarciadev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @malikKartik, sorry for the delay, you can build your own NextUI components wrapper doing this ->