Skip to content

Commit 24148d3

Browse files
Adds sheetStyle prop
1 parent d5376da commit 24148d3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export default function App() {
9797
| `backdropClosesSheet` | No | Whether tapping/clicking on the backdrop behind the bottom sheet will close it. | true/false | true |
9898
| `backdropBackgroundColor` | No | RGBA or Hex string value for the backdrop color. | RGBA/Hex string | '#25252599' |
9999
| `sheetBackgroundColor` | No | RGBA or Hex string value for the background color of the bottom sheet. | RGBA/Hex string | Dark: '#222222', Light: '#F3F3F3' |
100+
| `sheetStyle` | No | Inline JS style override for bottom sheet | Style object | undefined |
100101
| `draggable` | No | Whether the bottom sheet is draggable. | true/false | true |
101102
| `showDragIcon` | No | Whether to show the drag icon handle. Only displayed if `draggable` is set to true as well. | true/false | true |
102103
| `dragIconColor` | No | RGBA or Hex string value for the color of the drag icon handle. | RGBA/Hex string | Dark: '#444444', Light: '#A3A3A3' |

src/features/BottomSheet/BottomSheet.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface BottomSheetProps {
1414
backdropClosesSheet?: boolean | undefined;
1515
backdropBackgroundColor?: string | undefined;
1616
sheetBackgroundColor?: string | undefined;
17+
sheetStyle?: ViewStyle | undefined;
1718
draggable?: boolean | undefined;
1819
showDragIcon?: boolean | undefined;
1920
dragIconColor?: string | undefined;
@@ -36,6 +37,7 @@ export const BottomSheet = memo(
3637
backdropClosesSheet = true,
3738
backdropBackgroundColor,
3839
sheetBackgroundColor,
40+
sheetStyle,
3941
draggable = true,
4042
showDragIcon = true,
4143
dragIconColor,
@@ -153,7 +155,8 @@ export const BottomSheet = memo(
153155
borderTopRightRadius: borderRadius,
154156
borderTopLeftRadius: borderRadius,
155157
backgroundColor: sheetBackgroundColor || isDarkMode ? '#222222' : '#F3F3F3'
156-
}
158+
},
159+
sheetStyle
157160
]}
158161
>
159162
{isDraggable && showDragIcon && (

0 commit comments

Comments
 (0)