create-bdpa-react-scaffold 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/create-ui-lib.js +31 -0
- package/package.json +1 -1
package/create-ui-lib.js
CHANGED
|
@@ -1799,6 +1799,37 @@ if (fs.existsSync(bdpaImagePath)) {
|
|
|
1799
1799
|
if (doInstall) {
|
|
1800
1800
|
installDependencies(packageManager, BASE_DIR);
|
|
1801
1801
|
installShadcn(BASE_DIR);
|
|
1802
|
+
// Override shadcn's sonner.jsx which imports lucide-react.
|
|
1803
|
+
// This version uses Sonner's built-in icons and CSS variable theming.
|
|
1804
|
+
write("src/components/ui/sonner.jsx", `
|
|
1805
|
+
import { Toaster as Sonner } from "sonner";
|
|
1806
|
+
|
|
1807
|
+
const Toaster = ({ ...props }) => {
|
|
1808
|
+
return (
|
|
1809
|
+
<Sonner
|
|
1810
|
+
className="toaster group"
|
|
1811
|
+
toastOptions={{
|
|
1812
|
+
classNames: {
|
|
1813
|
+
toast:
|
|
1814
|
+
"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
1815
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
1816
|
+
actionButton:
|
|
1817
|
+
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground font-medium",
|
|
1818
|
+
cancelButton:
|
|
1819
|
+
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
1820
|
+
error: "group-[.toaster]:!bg-destructive group-[.toaster]:!text-destructive-foreground",
|
|
1821
|
+
success: "group-[.toaster]:border-border",
|
|
1822
|
+
warning: "group-[.toaster]:border-border",
|
|
1823
|
+
info: "group-[.toaster]:border-border",
|
|
1824
|
+
},
|
|
1825
|
+
}}
|
|
1826
|
+
{...props}
|
|
1827
|
+
/>
|
|
1828
|
+
);
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
export { Toaster };
|
|
1832
|
+
`);
|
|
1802
1833
|
}
|
|
1803
1834
|
|
|
1804
1835
|
installVSCodeExtensions();
|