Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

style: fix toaster

Brad Barbinb95a704b9925
diff --git a/apps/carbon/app/root.tsx b/apps/carbon/app/root.tsx
index 3d3d081fe0..7caf38d804 100644
--- a/apps/carbon/app/root.tsx
+++ b/apps/carbon/app/root.tsx
@@ -1,14 +1,14 @@
import { error, getBrowserEnv } from "@carbon/auth";
import { getSessionFlash } from "@carbon/auth/session.server";
import { validator } from "@carbon/form";
-import { Button, Heading, toast } from "@carbon/react";
+import { Button, Heading, toast, Toaster } from "@carbon/react";
import {
+ isRouteErrorResponse,
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
- isRouteErrorResponse,
useLoaderData,
useRouteError,
} from "@remix-run/react";
@@ -116,7 +116,7 @@ function Document({
</head>
<body className="h-full bg-background antialiased selection:bg-primary/10 selection:text-primary">
{children}
-
+ <Toaster position="bottom-right" />
<ScrollRestoration />
<Scripts />
<Analytics />
@@ -144,6 +144,7 @@ export default function App() {
return (
<Document mode={mode}>
<Outlet />
+
<script
dangerouslySetInnerHTML={{
__html: `window.env = ${JSON.stringify(env)}`,
diff --git a/apps/carbon/app/routes/x+/_layout.tsx b/apps/carbon/app/routes/x+/_layout.tsx
index c830425dd1..c7aec19057 100644
--- a/apps/carbon/app/routes/x+/_layout.tsx
+++ b/apps/carbon/app/routes/x+/_layout.tsx
@@ -1,4 +1,4 @@
-import { Toaster, TooltipProvider } from "@carbon/react";
+import { TooltipProvider } from "@carbon/react";
import { Outlet, useLoaderData, useNavigation } from "@remix-run/react";
import type { LoaderFunctionArgs } from "@vercel/remix";
import { json, redirect } from "@vercel/remix";
@@ -142,7 +142,6 @@ export default function AuthenticatedRoute() {
</div>
</div>
</div>
- <Toaster position="bottom-right" />
</TooltipProvider>
</RealtimeDataProvider>
</CarbonProvider>
diff --git a/apps/carbon/app/styles/tailwind.css b/apps/carbon/app/styles/tailwind.css
index eea71f7e3c..69f1fb3edb 100644
--- a/apps/carbon/app/styles/tailwind.css
+++ b/apps/carbon/app/styles/tailwind.css
@@ -1,24 +1,6 @@
@import url("non.geist");
@import url("non.geist/mono");
-@tailwind base;
-
-/* Chrome, Edge, and Safari */
-*::-webkit-scrollbar {
- width: 15px;
-}
-
-*::-webkit-scrollbar-track {
- background: var(--primary);
- border-radius: 5px;
-}
-
-*::-webkit-scrollbar-thumb {
- background-color: var(--secondary);
- border-radius: 14px;
- border: 3px solid var(--primary);
-}
-
@tailwind base;
@tailwind components;
@tailwind utilities;
diff --git a/apps/mes/app/styles/tailwind.css b/apps/mes/app/styles/tailwind.css
index ab49d8067d..11cb7b9827 100644
--- a/apps/mes/app/styles/tailwind.css
+++ b/apps/mes/app/styles/tailwind.css
@@ -1,22 +1,6 @@
@import url("non.geist");
@import url("non.geist/mono");
-/* Chrome, Edge, and Safari */
-*::-webkit-scrollbar {
- width: 15px;
-}
-
-*::-webkit-scrollbar-track {
- background: var(--primary);
- border-radius: 5px;
-}
-
-*::-webkit-scrollbar-thumb {
- background-color: var(--secondary);
- border-radius: 14px;
- border: 3px solid var(--primary);
-}
-
@tailwind base;
@tailwind components;
@tailwind utilities;
diff --git a/apps/www/app/styles/tailwind.css b/apps/www/app/styles/tailwind.css
index d8d683dc5e..681c57201a 100644
--- a/apps/www/app/styles/tailwind.css
+++ b/apps/www/app/styles/tailwind.css
@@ -1,22 +1,6 @@
@import url("non.geist");
@import url("non.geist/mono");
-/* Chrome, Edge, and Safari */
-*::-webkit-scrollbar {
- width: 15px;
-}
-
-*::-webkit-scrollbar-track {
- background: var(--primary);
- border-radius: 5px;
-}
-
-*::-webkit-scrollbar-thumb {
- background-color: var(--secondary);
- border-radius: 14px;
- border: 3px solid var(--primary);
-}
-
@tailwind base;
@tailwind components;
@tailwind utilities;
diff --git a/packages/react/src/Toast.tsx b/packages/react/src/Toast.tsx
index 373f8d0c1e..bb3e8b726d 100644
--- a/packages/react/src/Toast.tsx
+++ b/packages/react/src/Toast.tsx
@@ -17,6 +17,10 @@ const Toaster = ({ ...props }: ToasterProps) => {
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
cancelButton:
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
+ success:
+ "group-[.toaster]:bg-emerald-600 group-[.toaster]:text-emerald-100 dark:group-[.toaster]:bg-emerald-900 group-[.toaster]:border-emerald-800 dark:group-[.toaster]:text-emerald-400 group-[.toaster]:text-white",
+ error:
+ "group-[.toaster]:bg-red-600 group-[.toaster]:text-red-100 dark:group-[.toaster]:bg-red-900 group-[.toaster]:border-red-800 dark:group-[.toaster]:text-red-400 group-[.toaster]:text-white",
},
}}
{...props}
@@ -24,4 +28,4 @@ const Toaster = ({ ...props }: ToasterProps) => {
);
};
-export { Toaster, toast };
+export { toast, Toaster };
diff --git a/packages/tailwind/tailwind.config.js b/packages/tailwind/tailwind.config.js
index ab8551eb8c..b28fa9a37b 100644
--- a/packages/tailwind/tailwind.config.js
+++ b/packages/tailwind/tailwind.config.js
@@ -84,5 +84,10 @@ module.exports = {
},
},
},
- plugins: [require("tailwindcss-animate"), require("@tailwindcss/typography")],
+ plugins: [
+ require("tailwindcss-animate"),
+ require("tailwind-scrollbar"),
+ require("tailwind-scrollbar-hide"),
+ require("@tailwindcss/typography"),
+ ],
};