-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb7285e
commit 1b16cf8
Showing
8 changed files
with
129 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
.mykn-breadcrumbs { | ||
display: flex; | ||
|
||
&__separator { | ||
color: var(--theme-color-primary-800); | ||
margin-left: 4px; | ||
&__list { | ||
display: grid; | ||
grid-auto-flow: column; | ||
gap: var(--spacing-v-m); | ||
list-style: none; | ||
} | ||
|
||
& ol { | ||
display: flex; | ||
flex-wrap: wrap; | ||
list-style: none; | ||
&__item { | ||
display: grid; | ||
grid-auto-flow: column; | ||
gap: var(--spacing-v-xs); | ||
align-items: center; | ||
color: var(--theme-shade-600); | ||
|
||
a, | ||
li { | ||
font-size: var(--typography-font-size-body-xs); | ||
&--last { | ||
color: var(--theme-color-primary-800); | ||
} | ||
} | ||
|
||
li { | ||
display: flex; | ||
align-items: center; | ||
margin-right: 8px; | ||
color: var(--theme-shade-600); | ||
|
||
&:last-child { | ||
margin-right: 0; | ||
color: var(--theme-color-primary-800); | ||
} | ||
&__link { | ||
cursor: pointer; | ||
text-decoration: none; | ||
color: inherit; | ||
font-size: var(--typography-font-size-body-xs); | ||
} | ||
|
||
a { | ||
cursor: pointer; | ||
margin-right: 4px; | ||
color: var(--theme-shade-600); | ||
} | ||
} | ||
&__separator { | ||
color: var(--theme-color-primary-800); | ||
height: 20px; | ||
width: 20px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,39 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import { withRouter } from "storybook-addon-react-router-v6"; | ||
import React from "react"; | ||
|
||
import { Page } from "../page"; | ||
import { Breadcrumbs } from "./breadcrumbs"; | ||
|
||
const meta = { | ||
title: "Uncategorized/Breadcrumbs", | ||
title: "Controls/Breadcrumbs", | ||
component: Breadcrumbs, | ||
decorators: [withRouter], | ||
decorators: [ | ||
(Story) => ( | ||
<Page> | ||
<Story /> | ||
</Page> | ||
), | ||
], | ||
} satisfies Meta<typeof Breadcrumbs>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const BreadcrumbsComponent: Story = { | ||
args: { | ||
pathnames: ["...", "Zaaktype", "Zaaktype detail"], | ||
pathItems: [ | ||
{ | ||
label: "Home", | ||
path: "/", | ||
}, | ||
{ | ||
label: "Breadcrumbs", | ||
path: "/breadcrumbs", | ||
}, | ||
{ | ||
label: "Current page", | ||
path: "/breadcrumbs/current", | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
import clsx from "clsx"; | ||
import React from "react"; | ||
|
||
import { PProps } from "../p"; | ||
import "./li.scss"; | ||
|
||
export type LiProps = PProps; | ||
export type LiProps = React.PropsWithChildren< | ||
{ | ||
/** The size of the text. */ | ||
size?: "s" | "xs"; | ||
|
||
/** Additional class names to apply to the component */ | ||
className?: string; | ||
} & React.HTMLAttributes<HTMLLIElement> | ||
>; | ||
|
||
/** | ||
* Li component | ||
* @param children | ||
* @param size | ||
* @param className | ||
* @param props | ||
* @constructor | ||
*/ | ||
export const Li: React.FC<LiProps> = ({ children, size = "s", ...props }) => ( | ||
<li className={clsx("mykn-li", `mykn-li--size-${size}`)} {...props}> | ||
export const Li: React.FC<LiProps> = ({ | ||
children, | ||
size = "s", | ||
className, | ||
...props | ||
}) => ( | ||
<li | ||
className={clsx("mykn-li", `mykn-li--size-${size}`, className)} | ||
{...props} | ||
> | ||
{children} | ||
</li> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters