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

Function preloadComponentImages

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

Source from the content-addressed store, hash-verified

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

Callers 1

SearchMenuFunction · 0.90

Calls 1

preloadImageFunction · 0.85

Tested by

no test coverage detected