Skip to content

Rationale behind style props like padding for components like ListBoxItem? #957

Answered by endigo9740
AgarwalPragy asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry, this one got past me somehow. This was a user requested change. They wanted a way to set the child padding once on the parent and have it inherited down.

This solution is confusing, since the name padding seems to suggest that it is the padding for the ListBox. The docs make it clear that this padding prop is for the contained ListBoxItems, but that is not obvious without reading the docs.

Is IntelliSense not working for you? We've put a lot of work into ensuring that this information is passed to the IntelliSense popups so you don't have to check the docs for each prop setting.

PS: Note that since the default value of this prop is px-4 py-2, setting the prop to padding='p-10' d…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AgarwalPragy
Comment options

Answer selected by AgarwalPragy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants