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

Function ComponentIllustration

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

Source from the content-addressed store, hash-verified

507}
508
509function ComponentIllustration({name, href}: IllustrationProps) {
510 const illustration = componentIllustrations[name] || getDefaultIllustration(href);
511 const [light, dark] = illustration;
512
513 return (
514 <Image
515 src={[
516 {srcSet: light, colorScheme: 'light'},
517 {srcSet: dark, colorScheme: 'dark'}
518 ]}
519 alt=""
520 aria-hidden="true"
521 width={960}
522 height={600}
523 styles={illustrationStyles}
524 />
525 );
526}
527
528function getReleaseVersionLabel(href: string) {
529 // Match releases with or without .html extension

Callers

nothing calls this directly

Calls 1

getDefaultIllustrationFunction · 0.85

Tested by

no test coverage detected