MCPcopy Create free account
hub / github.com/adobe/react-spectrum / StatusIcon

Function StatusIcon

packages/@react-spectrum/ai/src/ResponseStatus.tsx:287–322  ·  view source on GitHub ↗
({status, pixelLoader}: {status: string; pixelLoader?: Cell[] | Cell[][]})

Source from the content-addressed store, hash-verified

285});
286
287function StatusIcon({status, pixelLoader}: {status: string; pixelLoader?: Cell[] | Cell[][]}) {
288 switch (status) {
289 case 'pending':
290 return (
291 <CenterBaseline>
292 <PixelLoader size={ICON_SIZE} icon={pixelLoader} />
293 </CenterBaseline>
294 );
295 case 'failed':
296 // Space holder to maintain layout during transition.
297 return <div className={style({size: ICON_SIZE})} />;
298 case 'success':
299 return (
300 <Provider
301 values={[
302 [
303 IconContext,
304 {
305 styles: style({
306 flexShrink: 0,
307 size: 20,
308 '--iconPrimary': {
309 type: 'fill',
310 value: 'currentColor'
311 }
312 })
313 }
314 ]
315 ]}>
316 <CenterBaseline slot="icon" styles={style({size: ICON_SIZE})}>
317 <CheckmarkCircle aria-hidden="true" />
318 </CenterBaseline>
319 </Provider>
320 );
321 }
322}
323
324const crossFadeContainerStyles = style({
325 position: 'relative'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected