Skip to content

Commit b2a14ce

Browse files
committed
feat: add borderRadius
1 parent 6b6dc34 commit b2a14ce

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ class Example extends React.Component {
8181
| onCloseStart | no | | Accepts a function to be called when the bottom sheet starts to close. |
8282
| onCloseEnd | no | | Accepts a function to be called when the bottom sheet is almost closing. |
8383
| callbackThreshold | no | 0.01 | Accepts a float value from 0 to 1 indicating the percentage (of the gesture movement) when the callbacks are gonna be called. |
84+
| borderRadius | no | | Border radius of content wrapper (excluding header) |
8485

8586

8687
## Methods

src/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ type Props = {
109109
onCloseStart?: () => void
110110
onCloseEnd?: () => void
111111
callbackThreshold?: number
112+
borderRadius?: number
112113
}
113114

114115
type State = {
@@ -733,6 +734,7 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
733734
}
734735

735736
render() {
737+
const { borderRadius } = this.props
736738
return (
737739
<React.Fragment>
738740
<Animated.View
@@ -813,6 +815,8 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
813815
style={{
814816
width: '100%',
815817
transform: [{ translateY: this.Y as any }],
818+
borderTopLeftRadius: borderRadius,
819+
borderTopRightRadius: borderRadius,
816820
}}
817821
onLayout={this.handleLayoutContent}
818822
>

0 commit comments

Comments
 (0)