Skip to content
Snippets Groups Projects
Commit 9697a07e authored by Johanna Szepanski's avatar Johanna Szepanski
Browse files

migrated IconBadge story

parent a2945280
No related branches found
No related tags found
1 merge request!221CE-3638: Migrate iconbadge and iconmenubutton
import { Paper } from "@mui/material";
import { AcUnit, Warning } from "@mui/icons-material";
import { Paper, Link } from "@mui/material";
import { AcUnit } from "@mui/icons-material";
import { IconBadge } from "../../../components/common/IconBadge";
import { useUniqueKeys } from "../../../hooks/useUniqueKeys";
......@@ -10,23 +10,23 @@ export default {
const iconBadges = [
{
icon: <AcUnit />,
title: "It's really cold outside!",
subtitle: "Dangerously so!"
title: "It's really cold outside!"
},
{
icon: <AcUnit />,
secondaryIcon: <Warning />,
title: "It's really cold outside!",
subtitle: "Dangerously so!"
},
{
icon: <AcUnit />,
title: "It's really cold outside!"
title: "It's really cold outside!",
subtitle: "With bigger gap between icon and title",
gap: 10
},
{
icon: <AcUnit />,
secondaryIcon: <Warning />,
title: "It's really cold outside!"
title: "It's really cold outside!",
subtitle: <Link>Subtitle as a custom component</Link>
}
];
......@@ -34,8 +34,8 @@ export const Default = () => {
const iconBadgesKeys = useUniqueKeys(iconBadges);
return (
<>
{iconBadges.map((badge, i) => {
return (
{iconBadgesKeys &&
iconBadges.map((badge, i) => (
<Paper
key={iconBadgesKeys[i]}
sx={{
......@@ -45,8 +45,7 @@ export const Default = () => {
>
<IconBadge {...badge} />
</Paper>
);
})}
))}
</>
);
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment