From 009bd42d3a48b71608d4dc01ecf35946f65a22cc Mon Sep 17 00:00:00 2001 From: astrid Date: Fri, 23 Aug 2024 13:22:48 +0200 Subject: [PATCH] background prop for sheet --- package.json | 2 +- src/components/Sheet/index.tsx | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index b42aa5d..ce0e813 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@grand-hawk/ui-components", - "version": "0.2.0", + "version": "0.2.1", "keywords": [ "roblox-ts", "react", diff --git a/src/components/Sheet/index.tsx b/src/components/Sheet/index.tsx index 574165c..56b1274 100644 --- a/src/components/Sheet/index.tsx +++ b/src/components/Sheet/index.tsx @@ -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) { +export function Sheet(componentProps: PropsWithChildren) { const theme = useTheme(); - return ; + const props = componentProps; + + const background = props.Background ? theme.background : theme.overlay; + props.Background = undefined; + + return ; }