Skip to content

How to get PropTypes of a component? #125

Answered by jrgarciadev
malikKartik asked this question in Help
Discussion options

You must be logged in to vote

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;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jrgarciadev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants