@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33import { styled } from '@mui/material/styles' ;
44import ListItem from '@mui/material/ListItem' ;
55import ButtonBase from '@mui/material/ButtonBase' ;
6- import Grid2 from '@mui/material/Grid2 ' ;
6+ import Grid from '@mui/material/Grid ' ;
77import Typography from '@mui/material/Typography' ;
88import Skeleton from '@mui/material/Skeleton' ;
99import { useTranslation } from 'react-i18next' ;
@@ -40,21 +40,21 @@ const StyledLogo = styled(Img, { name: 'ManifestListItem', slot: 'logo' })(({ th
4040
4141/** */
4242const Placeholder = ( ) => (
43- < Grid2 container className = { ns ( 'manifest-list-item' ) } spacing = { 2 } >
44- < Grid2 xs = { 3 } sm = { 2 } >
43+ < Grid container className = { ns ( 'manifest-list-item' ) } >
44+ < Grid size = { { sm : 2 , xs : 3 } } >
4545 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "rectangular" height = { 80 } width = { 120 } />
46- </ Grid2 >
47- < Grid2 xs = { 9 } sm = { 6 } >
46+ </ Grid >
47+ < Grid size = { { sm : 6 , xs : 9 } } >
4848 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "text" />
49- </ Grid2 >
50- < Grid2 xs = { 8 } sm = { 2 } >
49+ </ Grid >
50+ < Grid size = { { sm : 2 , xs : 8 } } >
5151 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "text" />
5252 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "text" />
53- </ Grid2 >
54- < Grid2 xs = { 4 } sm = { 2 } >
53+ </ Grid >
54+ < Grid size = { { sm : 2 , xs : 4 } } >
5555 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "rectangular" height = { 60 } width = { 60 } />
56- </ Grid2 >
57- </ Grid2 >
56+ </ Grid >
57+ </ Grid >
5858) ;
5959
6060/**
@@ -114,67 +114,73 @@ export function ManifestListItem({
114114 className = { active ? 'active' : '' }
115115 data-manifestid = { manifestId }
116116 data-active = { active }
117+ sx = { { width : '100%' } }
117118 >
118119 { ready ? (
119- < Grid2 container className = { ns ( 'manifest-list-item' ) } spacing = { 2 } >
120- < Grid2 xs = { 12 } sm = { 6 } >
120+ < Grid
121+ container
122+ className = { ns ( 'manifest-list-item' ) }
123+ sx = { { width : '100%' , alignItems : 'center' } }
124+ >
125+ < Grid size = { { sm : 5 , xs : 12 } } >
121126 < ButtonBase
122127 ref = { buttonRef }
123128 className = { ns ( 'manifest-list-item-title' ) }
124- style = { { width : '100%' } }
125129 onClick = { handleOpenButtonClick }
130+ sx = { { justifyContent : 'flex-start' , alignItems : 'center' , width : '100%' } }
126131 >
127- < Grid2
128- container
129- spacing = { 2 }
130- sx = { {
131- textAlign : 'left' ,
132- textTransform : 'initial' ,
133- } }
134- component = "span"
135- >
136- < Grid2 xs = { 4 } sm = { 3 } component = "span" >
137- { thumbnail
138- ? (
139- < StyledThumbnail
140- className = { [ ns ( 'manifest-list-item-thumb' ) ] }
141- src = { [ thumbnail ] }
142- alt = ""
143- height = "80"
144- unloader = { (
145- < Skeleton
146- variant = "rectangular"
147- animation = { false }
148- sx = { { bgcolor : 'grey[300]' } }
149- height = { 80 }
150- width = { 120 }
151- />
152- ) }
153- />
154- )
155- : < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "rectangular" height = { 80 } width = { 120 } /> }
156- </ Grid2 >
157- < Grid2 xs = { 8 } sm = { 9 } component = "span" >
158- { isCollection && (
159- < Typography component = "div" variant = "overline" >
160- { t ( isMultipart ? 'multipartCollection' : 'collection' ) }
132+ < Grid container component = "div" sx = { { width : '100%' } } >
133+ < Grid size = { 3 } sx = { { display : 'flex' , justifyContent : 'flex-start' , alignItems : 'center' } } >
134+ { thumbnail ? (
135+ < StyledThumbnail
136+ className = { [ ns ( 'manifest-list-item-thumb' ) ] }
137+ src = { [ thumbnail ] }
138+ alt = ""
139+ height = "80"
140+ unloader = { (
141+ < Skeleton
142+ variant = "rectangular"
143+ animation = { false }
144+ sx = { { bgcolor : 'grey[300]' } }
145+ height = { 80 }
146+ width = { 120 }
147+ />
148+ ) }
149+ />
150+ ) : (
151+ < Skeleton
152+ sx = { { bgcolor : 'grey[300]' } }
153+ variant = "rectangular"
154+ height = { 80 }
155+ width = { 120 }
156+ />
157+ ) }
158+ </ Grid >
159+ < Grid size = { 9 } sx = { { paddingLeft : 2 , alignContent : 'center' } } >
160+ { isCollection && (
161+ < Typography component = "div" variant = "overline" sx = { { textAlign : 'left' } } >
162+ { t ( isMultipart ? 'multipartCollection' : 'collection' ) }
161163 </ Typography >
162164 ) }
163- < Typography component = "span " variant = "h6" >
165+ < Typography component = "div " variant = "h6" sx = { { textAlign : 'left' } } >
164166 { title || manifestId }
165167 </ Typography >
166- </ Grid2 >
167- </ Grid2 >
168+ </ Grid >
169+ </ Grid >
168170 </ ButtonBase >
169- </ Grid2 >
170- < Grid2 xs = { 8 } sm = { 4 } >
171- < Typography className = { ns ( 'manifest-list-item-provider' ) } > { provider } </ Typography >
172- < Typography > { t ( 'numItems' , { count : size , number : size } ) } </ Typography >
173- </ Grid2 >
171+ </ Grid >
172+
173+ < Grid size = { { sm : 4 , xs : 8 } } >
174+ < Typography className = { ns ( 'manifest-list-item-provider' ) } >
175+ { provider }
176+ </ Typography >
177+ < Typography >
178+ { t ( 'numItems' , { count : size , number : size } ) }
179+ </ Typography >
180+ </ Grid >
174181
175- < Grid2 xs = { 4 } sm = { 2 } >
176- { manifestLogo
177- && (
182+ < Grid size = { { sm : 3 , xs : 4 } } >
183+ { manifestLogo && (
178184 < StyledLogo
179185 src = { [ manifestLogo ] }
180186 alt = ""
@@ -189,9 +195,9 @@ export function ManifestListItem({
189195 />
190196 ) }
191197 />
192- ) }
193- </ Grid2 >
194- </ Grid2 >
198+ ) }
199+ </ Grid >
200+ </ Grid >
195201 ) : (
196202 < Placeholder />
197203 ) }
0 commit comments