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

Function ComponentIllustration

packages/dev/s2-docs/src/ComponentCard.tsx:558–575  ·  view source on GitHub ↗
({name, href}: IllustrationProps)

Source from the content-addressed store, hash-verified

556}
557
558function ComponentIllustration({name, href}: IllustrationProps) {
559 const illustration = componentIllustrations[name] || getDefaultIllustration(href);
560 const [light, dark] = illustration;
561
562 return (
563 <Image
564 src={[
565 {srcSet: light, colorScheme: 'light'},
566 {srcSet: dark, colorScheme: 'dark'}
567 ]}
568 alt=""
569 aria-hidden="true"
570 width={960}
571 height={600}
572 styles={illustrationStyles}
573 />
574 );
575}
576
577function getReleaseVersionLabel(href: string) {
578 // Match releases with or without .html extension

Callers

nothing calls this directly

Calls 1

getDefaultIllustrationFunction · 0.85

Tested by

no test coverage detected