I am creating my own custom "wrapper" around a chakraui component, so I can add my own props, methods and whatever I might need later on.
However, one downside of doing this is that I don't get suggestions for the imported chakraui-Button proptypes in Visual Studio Code, but only the new proptype "testPropColor". The other properties are still working, but is there any way of passing them further down so I can see them as suggestions as well?
What I have is this: custom-component/button.js
import { Button as ChakraButton } from '@chakra-ui/react'
export default function Button(properties) {
const { testPropColor, children, ...props } = properties
return (
<ChakraButton color="testPropColor" {...props}>
{children}
</ChakraButton>
)
}
And how I am using this in a view:
import Button from 'custom-component/Button'
export default function ViewComponent() {
return (
<Button
bg="red"
testPropColor="blue">Test</Button>
)
}