diff --git a/packages/css/src/components/grid/README.md b/packages/css/src/components/grid/README.md
index 09061304ea..f1f7a07a5f 100644
--- a/packages/css/src/components/grid/README.md
+++ b/packages/css/src/components/grid/README.md
@@ -7,7 +7,7 @@ Verdeelt de breedte van het scherm in kolommen waarop de elementen van een pagin
Elke pagina moet het grid gebruiken als basis voor de layout.
Het staat dus direct binnen [Screen](?path=/docs/layout-screen--docs).
-Een [Footer](?path=/docs/react_containers-footer--docs) en een [Highlight](?path=/docs/react_containers-highlight--docs) zijn iets breder dan het grid.
+Een [Footer](?path=/docs/react_containers-footer--docs) en een [Spotlight](?path=/docs/react_containers-spotlight--docs) zijn iets breder dan het grid.
Vóór deze componenten sluit je een instantie van het grid af.
Erbinnen en eventueel erna start je een nieuwe.
Meerdere instanties van het grid component zijn dus mogelijk op een pagina.
diff --git a/packages/react/package.json b/packages/react/package.json
index 072de123b3..274851c20d 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -63,6 +63,7 @@
"react-dom": "18.2.0",
"rollup": "4.9.4",
"rollup-plugin-delete": "2.0.0",
+ "rollup-plugin-dts": "6.1.0",
"rollup-plugin-filesize": "10.0.0",
"rollup-plugin-node-externals": "6.1.2",
"rollup-plugin-node-polyfills": "0.2.1",
diff --git a/packages/react/rollup.config.mjs b/packages/react/rollup.config.mjs
index b8dd0d2570..fa3a4fdee0 100644
--- a/packages/react/rollup.config.mjs
+++ b/packages/react/rollup.config.mjs
@@ -7,6 +7,8 @@ import nodeExternal from 'rollup-plugin-node-externals'
import nodePolyfills from 'rollup-plugin-node-polyfills'
import peerDepsExternal from 'rollup-plugin-peer-deps-external'
import typescript from 'rollup-plugin-typescript2'
+import dts from 'rollup-plugin-dts'
+import del from 'rollup-plugin-delete'
const packageJson = JSON.parse(readFileSync('./package.json', 'utf8'))
@@ -46,7 +48,7 @@ export default [
include: /node_modules/,
}),
nodePolyfills(),
- typescript({ includeDependencies: false }),
+ typescript({ includeDependencies: false, useTsconfigDeclarationDir: true }),
babel({
presets: ['@babel/preset-react'],
babelHelpers: 'runtime',
@@ -58,4 +60,15 @@ export default [
filesize(),
],
},
+ {
+ input: './dist/dts/index.d.ts',
+ output: [{ file: 'dist/index.d.ts', format: 'es' }],
+ plugins: [
+ dts(),
+ del({
+ targets: 'dist/dts',
+ hook: 'buildEnd',
+ }),
+ ],
+ },
]
diff --git a/packages/react/src/Breadcrumb/Breadcrumb.test.tsx b/packages/react/src/Breadcrumb/Breadcrumb.test.tsx
index d5420454df..591dc45b36 100644
--- a/packages/react/src/Breadcrumb/Breadcrumb.test.tsx
+++ b/packages/react/src/Breadcrumb/Breadcrumb.test.tsx
@@ -4,6 +4,25 @@ import { Breadcrumb } from './Breadcrumb'
import '@testing-library/jest-dom'
describe('Breadcrumb', () => {
+ it('renders', () => {
+ render()
+ const component = screen.getByRole('navigation')
+ expect(component).toBeInTheDocument()
+ expect(component).toBeVisible()
+ })
+
+ it('renders a design system BEM class name', () => {
+ render()
+ const component = screen.getByRole('navigation')
+ expect(component).toHaveClass('amsterdam-breadcrumb')
+ })
+
+ it('renders an additional class name', () => {
+ render()
+ const component = screen.getByRole('navigation')
+ expect(component).toHaveClass('amsterdam-breadcrumb extra')
+ })
+
it('renders Breadcrumb component with children', () => {
const breadcrumbItems = [
{ label: 'Item 1', href: '/item-1' },
diff --git a/packages/react/src/Breadcrumb/Breadcrumb.tsx b/packages/react/src/Breadcrumb/Breadcrumb.tsx
index 814b4470bc..eb50c94944 100644
--- a/packages/react/src/Breadcrumb/Breadcrumb.tsx
+++ b/packages/react/src/Breadcrumb/Breadcrumb.tsx
@@ -3,8 +3,10 @@
* Copyright (c) 2023 Gemeente Amsterdam
*/
+import { clsx } from 'clsx'
import { forwardRef } from 'react'
import type { ForwardedRef, ForwardRefExoticComponent, HTMLAttributes, PropsWithChildren, RefAttributes } from 'react'
+import { BreadcrumbItem } from './BreadcrumbItem'
export type BreadcrumbProps = PropsWithChildren>
@@ -12,31 +14,15 @@ interface BreadcrumbComponent extends ForwardRefExoticComponent) => {
- return (
-