reactist icon indicating copy to clipboard operation
reactist copied to clipboard

Dropdown content has no padding

Open bigint opened this issue 5 years ago • 6 comments

🐛 Bug report

Current behavior

Drop down content has no padding

Steps to reproduce the bug

  1. Go to https://doist.github.io/reactist/?selectedKind=Dropdown&selectedStory=Component%20Overview&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybooks%2Fstorybook-addon-knobs
  2. Click the Trigger Button

Screenshot

Environment

In official GitHub pages, and my browser is Brave Chrome/84.0.4147.135

bigint avatar Aug 24 '20 06:08 bigint

I'm not sure if this was the intention when this component was created, but this is probably convenient, even if not intentional. You may not always want a padding forced on you over there. This gives more freedom to the user of the component to apply a padding to other elements inside it.

Imagine for instance that You want to show a list inside the dropdown and you show lines between these list items. You'd probably prefer the list item elements to reach all the way to the borders of the dropdown and then apply the paddings to the items instead.

That being said, the storybook example should do something like that because it does look weird.

gnapse avatar Aug 24 '20 13:08 gnapse

That makes sense @gnapse! You can close this if you want!

bigint avatar Aug 25 '20 12:08 bigint

I'll leave it open as a reminder to fix that storybook example.

gnapse avatar Aug 25 '20 12:08 gnapse