File tree Expand file tree Collapse file tree 2 files changed +43
-41
lines changed Expand file tree Collapse file tree 2 files changed +43
-41
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @linn-it/linn-form-components-library" ,
3- "version" : " 31.1.0-alpha.1 " ,
3+ "version" : " 31.1.0-alpha.2 " ,
44 "private" : false ,
55 "main" : " dist/index.cjs.js" ,
66 "module" : " dist/index.esm.js" ,
Original file line number Diff line number Diff line change 1- import React , { Fragment } from 'react' ;
1+ import React from 'react' ;
22import Typography from '@mui/material/Typography' ;
33import Link from '@mui/material/Link' ;
44import Box from '@mui/material/Box' ;
@@ -43,48 +43,50 @@ function Breadcrumbs({
4343 } , [ ] ) ;
4444
4545 return (
46- < Box style = { { marginLeft : '20px' } } >
47- < Link
48- key = "home"
49- href = { homeUrl }
50- variant = "button"
51- sx = { {
52- '&:hover' : {
53- cursor : 'pointer'
46+ < >
47+ < Box style = { { marginLeft : '20px' } } >
48+ < Link
49+ key = "home"
50+ href = { homeUrl }
51+ variant = "button"
52+ sx = { {
53+ '&:hover' : {
54+ cursor : 'pointer'
55+ }
56+ } }
57+ >
58+ HOME
59+ </ Link >
60+ < > { ' / ' } </ >
61+ { crumbs . map ( ( crumb , index ) => {
62+ if ( index < crumbs . length - 1 ) {
63+ return (
64+ < Box key = { index } >
65+ < Link
66+ key = { crumb . href }
67+ href = { crumb . href }
68+ variant = "button"
69+ sx = { {
70+ '&:hover' : {
71+ cursor : 'pointer'
72+ }
73+ } }
74+ onClick = { crumb . onClick }
75+ >
76+ { crumb . caption }
77+ </ Link >
78+ < > { ' / ' } </ >
79+ </ Box >
80+ ) ;
5481 }
55- } }
56- >
57- HOME
58- </ Link >
59- < > { ' / ' } </ >
60- { crumbs . map ( ( crumb , index ) => {
61- if ( index < crumbs . length - 1 ) {
6282 return (
63- < Box key = { index } >
64- < Link
65- key = { crumb . href }
66- href = { crumb . href }
67- variant = "button"
68- sx = { {
69- '&:hover' : {
70- cursor : 'pointer'
71- }
72- } }
73- onClick = { crumb . onClick }
74- >
75- { crumb . caption }
76- </ Link >
77- < > { ' / ' } </ >
78- </ Box >
83+ < Typography display = "inline" variant = "button" key = { index } >
84+ { crumb . caption }
85+ </ Typography >
7986 ) ;
80- }
81- return (
82- < Typography display = "inline" variant = "button" key = { index } >
83- { crumb . caption }
84- </ Typography >
85- ) ;
86- } ) }
87- </ Box >
87+ } ) }
88+ </ Box >
89+ </ >
8890 ) ;
8991}
9092
You can’t perform that action at this time.
0 commit comments