Wrap some components to do not expose everything #5128
santomegonzalo
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everybody!
I'm trying to wrap some of the components so, from the outside, nobody could change some attributes. For example, I would like to wrap
Button
into our Button component and allow everybody to play with every prop except with padding. We want to prevent everybody from changing the padding of a button because thesize
property will manage that.Is it possible? I looked at all the interfaces, but I couldn't find a way to prevent this by typescript without using
Omit
Beta Was this translation helpful? Give feedback.
All reactions