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

Function preloadComponentImages

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

Source from the content-addressed store, hash-verified

494}
495
496export function preloadComponentImages(names: string[]) {
497 for (let key of names) {
498 let v = componentIllustrations[key];
499 if (v) {
500 let [light, dark] = v;
501 preloadImage(light, dark);
502 } else if (/^v\d/.test(key)) {
503 preloadImage(BackgroundLight, BackgroundDark);
504 }
505 }
506}
507
508const illustrationContainer = style({
509 width: 'full',

Callers 1

SearchMenuFunction · 0.90

Calls 1

preloadImageFunction · 0.85

Tested by

no test coverage detected