diff --git a/components/ui/custom/CustomBox.tsx b/components/ui/custom/CustomBox.tsx new file mode 100644 index 0000000000..acc4b3d1c8 --- /dev/null +++ b/components/ui/custom/CustomBox.tsx @@ -0,0 +1,34 @@ +import { Card, CardBody, CardHeader, Divider } from "@nextui-org/react"; +import React from "react"; + +interface CustomBoxProps { + children: React.ReactNode; + preTitle?: string; + subTitle?: string; + title?: string; +} + +export const CustomBox = ({ + children, + preTitle, + subTitle, + title, +}: CustomBoxProps) => { + return ( + + {(preTitle || subTitle || title) && ( + <> + + {preTitle && ( +

{preTitle}

+ )} + {subTitle && {subTitle}} + {title &&

{title}

} +
+ + + )} + {children} +
+ ); +}; diff --git a/components/ui/custom/index.ts b/components/ui/custom/index.ts new file mode 100644 index 0000000000..00732c48c8 --- /dev/null +++ b/components/ui/custom/index.ts @@ -0,0 +1 @@ +export * from "./CustomBox";