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

Add wrappingComponent prop to BottomSheet

Open ftzi opened this issue 4 years ago • 10 comments

Feature Request

Hi! I am the author of react-native-shadow-2. Being so, I simply can't use elevation/iOS shadow props hehe.

In my current contract, I need to use the BottomSheet. I never used it before - it's a really cool lib!

To use my Shadow component, I need to wrap it around the child component.

Why it is needed

To allow further customizations, like using my Shadow.

Possible implementation

What I am thinking right now is to have a wrappingComponent prop, to enter either the element or the functional component. The functional component is easier, it would ({children}) => JSX.Element. The element could be doable with cloneElement, but I don't think it's required. But, maybe, the FC would cause state loss.

Code sample

<BottomSheet
  {...}
  wrappingComponent={({children}) => <Shadow  children={children}/>}
>

ftzi avatar Feb 23 '22 00:02 ftzi

Maybe, there could be instead a topComponent, to be drawn above the Sheet in a absolute positioning. But I ain't sure if there is a borderRadius it would work properly.

ftzi avatar Feb 23 '22 00:02 ftzi

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Mar 25 '22 09:03 github-actions[bot]

Still an issue

ftzi avatar Mar 25 '22 14:03 ftzi

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 25 '22 09:04 github-actions[bot]

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 26 '22 09:05 github-actions[bot]

Up

ftzi avatar May 26 '22 12:05 ftzi

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 27 '22 09:06 github-actions[bot]

🆙

ftzi avatar Jun 27 '22 09:06 ftzi

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jul 28 '22 09:07 github-actions[bot]

Up

ftzi avatar Jul 28 '22 12:07 ftzi

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Aug 29 '22 09:08 github-actions[bot]

This issue was closed because it has been stalled for 5 days with no activity.

github-actions[bot] avatar Sep 04 '22 09:09 github-actions[bot]