Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 009bd42

Browse files
committed
background prop for sheet
1 parent 1fa035b commit 009bd42

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@grand-hawk/ui-components",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"keywords": [
55
"roblox-ts",
66
"react",

src/components/Sheet/index.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ import { useTheme } from 'components/ThemeProvider';
66
import type { PropsWithChildren } from '@rbxts/react';
77
import type { BoxProps } from 'components/Box';
88

9-
export interface SheetProps extends BoxProps {}
9+
export interface SheetProps extends BoxProps {
10+
Background?: boolean;
11+
}
1012

11-
export function Sheet(props: PropsWithChildren<SheetProps>) {
13+
export function Sheet(componentProps: PropsWithChildren<SheetProps>) {
1214
const theme = useTheme();
1315

14-
return <Box BackgroundColor3={theme.overlay} {...props} />;
16+
const props = componentProps;
17+
18+
const background = props.Background ? theme.background : theme.overlay;
19+
props.Background = undefined;
20+
21+
return <Box BackgroundColor3={background} {...props} />;
1522
}

0 commit comments

Comments
 (0)