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

Function preloadComponentImages

packages/dev/s2-docs/src/ComponentCard.tsx:445–455  ·  view source on GitHub ↗
(names: string[])

Source from the content-addressed store, hash-verified

443}
444
445export function preloadComponentImages(names: string[]) {
446 for (let key of names) {
447 let v = componentIllustrations[key];
448 if (v) {
449 let [light, dark] = v;
450 preloadImage(light, dark);
451 } else if (/^v\d/.test(key)) {
452 preloadImage(BackgroundLight, BackgroundDark);
453 }
454 }
455}
456
457const illustrationContainer = style({
458 width: 'full',

Callers 1

SearchMenuFunction · 0.90

Calls 1

preloadImageFunction · 0.85

Tested by

no test coverage detected