Breadcrumbs
(s'ouvre dans un nouvel onglet)
export const Default = () => (
<Box p="1V">
<Breadcrumbs />
</Box>
);
export const WithCustomRootLabel = () => (
<Box p="1V">
<Breadcrumbs rootLabel="Tableau de bord" />
</Box>
);
export const WithCustomLabels = () => (
<Box p="1V">
<Breadcrumbs
getLabel={(segment, _index, _path) => {
const labels: Record<string, string> = {
admin: 'Administration',
missions: 'Missions',
show: 'Détail',
salarie: 'Espace salarié',
client: 'Espace client',
};
return labels[segment] ?? segment;
export const WithCustomHref = () => (
<Box p="1V">
<Breadcrumbs
getHref={(segment, _index, path) => {
const hrefs: Record<string, string> = {
components: '/ui-kit/components',
};
return hrefs[segment] ?? path;
}}
/>
</Box>
);
export const WithNoLink = () => (
<Box p="1V">
<Breadcrumbs
getHref={(segment, _index, path) => {
const noLink = ['components'];
return noLink.includes(segment) ? null : path;
}}
/>
</Box>
);
export const WithSegmentsToSkip = () => (
<Box p="1V">
<Breadcrumbs
segmentsToSkip={['admin', 'ui-kit', 'components']}
getLabel={(segment, _index, _path) => {
const labels: Record<string, string> = {
admin: 'Administration',
missions: 'Missions',
show: 'Détail',
salarie: 'Espace salarié',
client: 'Espace client',
};