mm
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import React from "react";
|
||||
import { useThemeContext } from "./ThemeProvider/useThemeContext";
|
||||
import { cn } from "tailwind-variants";
|
||||
import type { CommonProps } from "@/common/CommonProps";
|
||||
|
||||
@@ -23,12 +22,8 @@ const Box = <C extends React.ElementType = "div">(
|
||||
) => {
|
||||
const { as: Component = "div", children, className, ...rest } = props;
|
||||
|
||||
const { themeClass } = useThemeContext();
|
||||
if (!themeClass) {
|
||||
throw new Error("Box must be used within a ThemeProvider");
|
||||
}
|
||||
|
||||
const boxRootClass = cn(themeClass, className);
|
||||
const boxRootClass = cn( className);
|
||||
|
||||
return (
|
||||
<Component ref={ref} className={boxRootClass} {...(rest as any)}>
|
||||
|
||||
Reference in New Issue
Block a user