1.9.0 • Published 10 months ago
@maggioli-design-system/magma-react v1.9.0
MagmaReact
Magma React specific building blocks on top of @maggioli-design-system/magma components.
Installation
Install package
npm i @maggioli-design-system/magma-reactIcon
Set the path where the mds-icon component will get the svg icons inside UseEffect otherwise window is not defined
// app.js
export default function App({
children,
}) {
useEffect(() => {
sessionStorage.setItem("mdsIconSvgPath", `/svg/`);
}, []);
return <>{children}</>;
}Example using Nextjs with App Router
// client_globals_wrapper.tsx
export default function ClientGlobalsWrapper({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
useEffect(() => {
sessionStorage.setItem("mdsIconSvgPath", `/svg/`);
}, []);
return <>{children}</>;
}// app/layout.tsx
export default function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return (
<html>
<body>
<ClientGlobalsWrapper>
<main>{children}</main>
</ClientGlobalsWrapper>
</body>
</html>
);
}Usage Example
import { MdsText } from '@maggioli-design-system/magma-react'
export default function Component() {
return (
<MdsText typography="h3">Hello World</MdsText>
);
}1.9.0
10 months ago
1.8.0
10 months ago
1.7.0
11 months ago
1.6.0
12 months ago
1.5.1
12 months ago
1.5.0
12 months ago
1.4.1
1 year ago
1.4.0
1 year ago
1.3.1
1 year ago
1.3.0
1 year ago
1.2.0
1 year ago
1.1.0
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
1.0.0-beta
1 year ago