link-stack/packages/leafcutter-ui/components/AboutBox.tsx

36 lines
654 B
TypeScript
Raw Normal View History

2023-06-26 10:07:12 +00:00
"use client";
2023-05-24 20:27:57 +00:00
import { FC, PropsWithChildren } from "react";
2023-02-13 13:46:56 +00:00
import { Box } from "@mui/material";
2024-03-20 17:51:21 +01:00
import { useLeafcutterContext } from "./LeafcutterProvider";
2023-02-13 13:46:56 +00:00
2023-05-24 20:27:57 +00:00
type AboutBoxProps = PropsWithChildren<{
2023-02-13 13:46:56 +00:00
backgroundColor: string;
2023-05-24 20:27:57 +00:00
}>;
2023-02-13 13:46:56 +00:00
2023-05-24 20:27:57 +00:00
export const AboutBox: FC<AboutBoxProps> = ({
backgroundColor,
children,
}: any) => {
2023-02-13 13:46:56 +00:00
const {
colors: { white },
2024-03-20 17:51:21 +01:00
} = useLeafcutterContext();
2023-02-13 13:46:56 +00:00
return (
<Box
sx={{
width: "100%",
backgroundColor,
color: white,
p: 4,
borderRadius: "10px",
mt: "66px",
mb: "22px",
textAlign: "center",
}}
>
{children}
</Box>
);
};