MCPcopy Index your code
hub / github.com/adobe/react-spectrum / preloadComponentImages

Function preloadComponentImages

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

Source from the content-addressed store, hash-verified

388}
389
390export function preloadComponentImages(names: string[]) {
391 for (let key of names) {
392 let v = componentIllustrations[key];
393 if (v) {
394 let [light, dark] = v;
395 preloadImage(light, dark);
396 } else if (/^v\d/.test(key)) {
397 preloadImage(BackgroundLight, BackgroundDark);
398 }
399 }
400}
401
402const illustrationContainer = style({
403 width: 'full',

Callers 1

SearchMenuFunction · 0.90

Calls 1

preloadImageFunction · 0.85

Tested by

no test coverage detected