chore: Moved Breadcrumbs to design system and added stories
Approved-by: Bianca Widstam
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { MaterialIcon } from "../Icons/MaterialIcon"
|
||||
import { BreadcrumbSkeleton } from "./Breadcrumb/BreadcrumbSkeleton"
|
||||
import { BreadcrumbsProps } from "./types"
|
||||
import { variants } from "./variants"
|
||||
|
||||
import SkeletonShimmer from "../SkeletonShimmer"
|
||||
import styles from "./breadcrumbs.module.css"
|
||||
|
||||
export function BreadcrumbsSkeleton({
|
||||
color,
|
||||
size,
|
||||
}: Pick<BreadcrumbsProps, "color" | "size">) {
|
||||
const classNames = variants({ color, size })
|
||||
|
||||
return (
|
||||
<nav className={classNames}>
|
||||
<ol className={styles.breadcrumbs}>
|
||||
<BreadcrumbSkeleton>
|
||||
<MaterialIcon icon="home" size={20} color="CurrentColor" />
|
||||
</BreadcrumbSkeleton>
|
||||
<BreadcrumbSkeleton>
|
||||
<SkeletonShimmer width="20ch" />
|
||||
</BreadcrumbSkeleton>
|
||||
<BreadcrumbSkeleton isLastBreadcrumb>
|
||||
<SkeletonShimmer width="20ch" />
|
||||
</BreadcrumbSkeleton>
|
||||
</ol>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user