Skip to content

Commit

Permalink
background prop for sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
ari-party committed Aug 23, 2024
1 parent 1fa035b commit 009bd42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grand-hawk/ui-components",
"version": "0.2.0",
"version": "0.2.1",
"keywords": [
"roblox-ts",
"react",
Expand Down
13 changes: 10 additions & 3 deletions src/components/Sheet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ import { useTheme } from 'components/ThemeProvider';
import type { PropsWithChildren } from '@rbxts/react';
import type { BoxProps } from 'components/Box';

export interface SheetProps extends BoxProps {}
export interface SheetProps extends BoxProps {
Background?: boolean;
}

export function Sheet(props: PropsWithChildren<SheetProps>) {
export function Sheet(componentProps: PropsWithChildren<SheetProps>) {
const theme = useTheme();

return <Box BackgroundColor3={theme.overlay} {...props} />;
const props = componentProps;

const background = props.Background ? theme.background : theme.overlay;
props.Background = undefined;

return <Box BackgroundColor3={background} {...props} />;
}

0 comments on commit 009bd42

Please sign in to comment.