razorpay / blade

Design System that powers Razorpay
https://blade.razorpay.com
MIT License
509 stars 143 forks source link

Support `width` prop on ActionList / DropdownOverlay #1660

Closed parichay28 closed 11 months ago

parichay28 commented 1 year ago

Current Behaviour

image

Expected Behaviour Figma

image
saurabhdaware commented 1 year ago

Thanks for creating issue. Checking this with our designer on what would be the expected usage.

saurabhdaware commented 1 year ago

Hi @parichay28, discussed with designer and I think the consumers should get option to set width of the ActionList.

So ideally we should have a width prop on DropdownOverlay component. Currently it doesn't exist but to get unblocked, you can have a Box wrapper around ActionList and set width there.

Here'e example - https://codesandbox.io/s/ckrfhs?file=/App.tsx&utm_medium=sandpack

I'll keep this issue open and tag it as P1. We can eventually add a width prop in DropdownOverlay or ActionList itself so extra Box won't be necessary.

parichay28 commented 1 year ago

Hey @saurabhdaware, wrapping ActionList with Box won't work since DropdownOverlay has it's own width.

image
saurabhdaware commented 1 year ago

@parichay28 DropdownOverlay has 240px min-width so it can't go beyond that. There shouldn't be any usecase to go lower than that I believe since design itself has min-width 240px on figma

pritipsingh commented 1 year ago

Hey @saurabhdaware if no one is working on this, can I please take this up?

saurabhdaware commented 1 year ago

yeah sure! Thank you 🥳

harshalkaigaonkar commented 1 year ago

Hey @saurabhdaware, can i try this too, if @pritipsingh is okay to?

pritipsingh commented 1 year ago

hey @harshalkaigaonkar I am actually done with it just in the testing phase :)

pritipsingh commented 11 months ago

Hey @saurabhdaware apologies for a bit of delay, got caught up with other tasks. but currently I have only added it for web, let me know if this is required for native too?