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

Function ExampleImage

packages/dev/s2-docs/src/ExampleList.tsx:101–119  ·  view source on GitHub ↗
({name, itemProp}: {name: string; itemProp?: string})

Source from the content-addressed store, hash-verified

99});
100
101export function ExampleImage({name, itemProp}: {name: string; itemProp?: string}) {
102 let img = images[path.basename(name)];
103 if (!Array.isArray(img)) {
104 return <Image src={img} alt="" styles={image} />;
105 }
106
107 let [light, dark] = img;
108 return (
109 <Image
110 src={[
111 {srcSet: light, colorScheme: 'light'},
112 {srcSet: dark, colorScheme: 'dark'}
113 ]}
114 alt=""
115 itemProp={itemProp}
116 styles={image}
117 />
118 );
119}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected