Files
Checkmate/client/src/Components/design-elements/BaseBox.tsx
T

23 lines
551 B
TypeScript
Raw Normal View History

2026-01-23 23:54:58 +00:00
import Box, { type BoxProps } from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
2026-09-04 11:28:10 -07:00
import { forwardRef } from "react";
2026-01-23 23:54:58 +00:00
2026-09-04 11:28:10 -07:00
export const BaseBox = forwardRef<HTMLDivElement, BoxProps>(({ sx, ...rest }, ref) => {
2026-01-23 23:54:58 +00:00
const theme = useTheme();
return (
<Box
2026-09-04 11:28:10 -07:00
ref={ref}
2026-01-23 23:54:58 +00:00
{...rest}
sx={{
backgroundColor: theme.palette.background.paper,
border: 1,
borderStyle: "solid",
borderColor: theme.palette.divider,
borderRadius: theme.shape.borderRadius,
...sx,
}}
/>
);
2026-09-04 11:28:10 -07:00
});
BaseBox.displayName = "BaseBox";