@@ -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 Grid from '@mui/material/Grid ' ;
6+ import Grid2 from '@mui/material/Grid2 ' ;
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- < Grid container className = { ns ( 'manifest-list-item' ) } spacing = { 2 } >
44- < Grid item xs = { 3 } sm = { 2 } >
43+ < Grid2 container className = { ns ( 'manifest-list-item' ) } spacing = { 2 } >
44+ < Grid2 xs = { 3 } sm = { 2 } >
4545 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "rectangular" height = { 80 } width = { 120 } />
46- </ Grid >
47- < Grid item xs = { 9 } sm = { 6 } >
46+ </ Grid2 >
47+ < Grid2 xs = { 9 } sm = { 6 } >
4848 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "text" />
49- </ Grid >
50- < Grid item xs = { 8 } sm = { 2 } >
49+ </ Grid2 >
50+ < Grid2 xs = { 8 } sm = { 2 } >
5151 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "text" />
5252 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "text" />
53- </ Grid >
54- < Grid item xs = { 4 } sm = { 2 } >
53+ </ Grid2 >
54+ < Grid2 xs = { 4 } sm = { 2 } >
5555 < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "rectangular" height = { 60 } width = { 60 } />
56- </ Grid >
57- </ Grid >
56+ </ Grid2 >
57+ </ Grid2 >
5858) ;
5959
6060/**
@@ -116,15 +116,15 @@ export function ManifestListItem({
116116 data-active = { active }
117117 >
118118 { ready ? (
119- < Grid container className = { ns ( 'manifest-list-item' ) } spacing = { 2 } >
120- < Grid item xs = { 12 } sm = { 6 } >
119+ < Grid2 container className = { ns ( 'manifest-list-item' ) } spacing = { 2 } >
120+ < Grid2 xs = { 12 } sm = { 6 } >
121121 < ButtonBase
122122 ref = { buttonRef }
123123 className = { ns ( 'manifest-list-item-title' ) }
124124 style = { { width : '100%' } }
125125 onClick = { handleOpenButtonClick }
126126 >
127- < Grid
127+ < Grid2
128128 container
129129 spacing = { 2 }
130130 sx = { {
@@ -133,7 +133,7 @@ export function ManifestListItem({
133133 } }
134134 component = "span"
135135 >
136- < Grid item xs = { 4 } sm = { 3 } component = "span" >
136+ < Grid2 xs = { 4 } sm = { 3 } component = "span" >
137137 { thumbnail
138138 ? (
139139 < StyledThumbnail
@@ -153,8 +153,8 @@ export function ManifestListItem({
153153 />
154154 )
155155 : < Skeleton sx = { { bgcolor : 'grey[300]' } } variant = "rectangular" height = { 80 } width = { 120 } /> }
156- </ Grid >
157- < Grid item xs = { 8 } sm = { 9 } component = "span" >
156+ </ Grid2 >
157+ < Grid2 xs = { 8 } sm = { 9 } component = "span" >
158158 { isCollection && (
159159 < Typography component = "div" variant = "overline" >
160160 { t ( isMultipart ? 'multipartCollection' : 'collection' ) }
@@ -163,16 +163,16 @@ export function ManifestListItem({
163163 < Typography component = "span" variant = "h6" >
164164 { title || manifestId }
165165 </ Typography >
166- </ Grid >
167- </ Grid >
166+ </ Grid2 >
167+ </ Grid2 >
168168 </ ButtonBase >
169- </ Grid >
170- < Grid item xs = { 8 } sm = { 4 } >
169+ </ Grid2 >
170+ < Grid2 xs = { 8 } sm = { 4 } >
171171 < Typography className = { ns ( 'manifest-list-item-provider' ) } > { provider } </ Typography >
172172 < Typography > { t ( 'numItems' , { count : size , number : size } ) } </ Typography >
173- </ Grid >
173+ </ Grid2 >
174174
175- < Grid item xs = { 4 } sm = { 2 } >
175+ < Grid2 xs = { 4 } sm = { 2 } >
176176 { manifestLogo
177177 && (
178178 < StyledLogo
@@ -190,8 +190,8 @@ export function ManifestListItem({
190190 ) }
191191 />
192192 ) }
193- </ Grid >
194- </ Grid >
193+ </ Grid2 >
194+ </ Grid2 >
195195 ) : (
196196 < Placeholder />
197197 ) }
@@ -203,7 +203,11 @@ ManifestListItem.propTypes = {
203203 active : PropTypes . bool ,
204204 addWindow : PropTypes . func . isRequired ,
205205 buttonRef : PropTypes . elementType ,
206- error : PropTypes . string ,
206+ error : PropTypes . oneOfType ( [
207+ PropTypes . string ,
208+ PropTypes . bool ,
209+ PropTypes . oneOf ( [ null ] ) , // for null
210+ ] ) ,
207211 fetchManifest : PropTypes . func . isRequired ,
208212 handleClose : PropTypes . func ,
209213 isCollection : PropTypes . bool ,
0 commit comments