diff --git a/pkgs/ui/pconf.cjs b/pkgs/ui/pconf.cjs index fa7765f54..f72fee6f8 100644 --- a/pkgs/ui/pconf.cjs +++ b/pkgs/ui/pconf.cjs @@ -1,4 +1,5 @@ // prettier.config.js module.exports = { plugins: ["prettier-plugin-tailwindcss"], + tailwindFunctions: ["clsx", "tw"], }; diff --git a/pkgs/ui/src/app/layout.tsx b/pkgs/ui/src/app/layout.tsx index 9cc1ef4aa..82233b193 100644 --- a/pkgs/ui/src/app/layout.tsx +++ b/pkgs/ui/src/app/layout.tsx @@ -16,8 +16,8 @@ import { StyledEngineProvider } from "@mui/material/styles"; import { darkTheme, lightTheme } from "./theme/themes"; import { Sidebar } from "@/components/sidebar"; import MenuIcon from "@mui/icons-material/Menu"; -import { ChevronLeft } from "@mui/icons-material"; import Image from "next/image"; +import { tw } from "@/utils/tailwind"; const roboto = localFont({ src: [ @@ -29,6 +29,9 @@ const roboto = localFont({ ], }); +// add negative margin for smooth transition to fill the space of the sidebar +const translate = tw`lg:-ml-64 -ml-14`; + export default function RootLayout({ children, }: { @@ -65,8 +68,12 @@ export default function RootLayout({ show={showSidebar} onClose={() => setShowSidebar(false)} /> -