react-native-actions-sheet icon indicating copy to clipboard operation
react-native-actions-sheet copied to clipboard

Applying width to `containerStyle` applies to both container and contents

Open bradjones1 opened this issue 1 year ago • 1 comments

Thanks for this awesome library. I particularly love that it works both on native and web.

I am working on my web UI and would like to constrain the maximum width of the action sheet. E.g., I only want it to be a maximum of 500px wide, so the contents don't spread across the whole width of the window.

I attempted to apply a width or max-width style value to the containerStyle prop, however it applied to both the action sheet as well as the contents. I only want the former.

I think this is because of this line:

https://github.com/ammarahm-ed/react-native-actions-sheet/blob/93cf9fc943cf9e30cbbb7d4b15a687d1f3fc040c/src/index.tsx#L1131

For the moment I am adding a max-width value to a view inside of the action sheet, but ideally I'd like for it to be the other way around.

bradjones1 avatar May 20 '23 20:05 bradjones1

I also fully understand maintainers are not working for free and don't expect this to be solved for me, I'm mostly opening this up so I have something to link to in a @todo in my code for when I can loop back around on this.

bradjones1 avatar May 20 '23 20:05 bradjones1