// ShapeBackgroundWrapper.tsx import React from "react"; import { ShapeBackgroundWrapperProps, ThemeKey } from "./types"; export const ShapeBackgroundWrapper: React.FC = ({ children, background, className, fill = "yellow", maxFit, show = true, path = "path2", }) => { const variantClass = `${path}`; const textColorClasses: Record = { blue: "text-[#07B2E2]", green: "text-[#26B170]", yellow: "text-[#F5FF1E]", purple: "text-[#931D69]", white: "text-white", navy: "text-[#00002D]", }; const bgColorClasses: Record = { blue: "bg-[#07B2E2]", green: "bg-[#26B170]", yellow: "bg-[#F5FF1E]", purple: "bg-[#931D69]", white: "bg-white", navy: "bg-[#00002D]", }; const isThemeKey = typeof background === "string" && background in bgColorClasses; const bgClass = isThemeKey ? bgColorClasses[background as ThemeKey] : undefined; const bgStyle = background && !isThemeKey ? { background } : undefined; const fillClass = fill in textColorClasses ? textColorClasses[fill as ThemeKey] : "text-[#F5FF1E]"; if (!show) { return (
{children}
); } return (
{path === "path1" && ( )} {path === "path2" && ( )} {path === "path3" && ( )} {path === "path4" && ( )}
{children}
); }; export default ShapeBackgroundWrapper;