Skip to content

Commit

Permalink
docs(core): ✨ add alt text sample
Browse files Browse the repository at this point in the history
add alt text sample with CoreImage

Ref: #186
  • Loading branch information
anantakumarghosh committed Aug 16, 2024
1 parent 5b9c36a commit 7f30fdb
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions app/components/component-docs/dataDisplay/CoreImage.docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,38 @@ export default function CoreImageDocs() {
<CodeImport name="CoreImage" />

<CodeSample
title={"Simple CoreImage "}
title={"Sample CoreImage "}
description={"Below is a sample of how to use the CoreImage component."}
code={`<CoreImage width={200} height={200}
src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Phoenicopterus_ruber_in_S%C3%A3o_Paulo_Zoo.jpg">
</CoreImage>`}
code={`<CoreImage
width={200}
height={200}
alt="Phoenicopterus ruber"
src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Phoenicopterus_ruber_in_S%C3%A3o_Paulo_Zoo.jpg"
/>`}
renderElement={<>
<CoreImage
width={200}
height={200}
src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Phoenicopterus_ruber_in_S%C3%A3o_Paulo_Zoo.jpg">
</CoreImage>
alt="Phoenicopterus ruber"
src="https://upload.wikimedia.org/wikipedia/commons/f/f9/Phoenicopterus_ruber_in_S%C3%A3o_Paulo_Zoo.jpg"
/>
</>}
/>

<CodeSample
title={"Alt text"}
description={"With alt text set, the image will have alternative text. For demonstration purposes, the image source(src) has been removed."}
code={`<CoreImage
width={200}
height={200}
alt="Phoenicopterus ruber"
/>`}
renderElement={<>
<CoreImage
width={200}
height={200}
alt="Phoenicopterus ruber"
/>
</>}
/>

Expand Down

0 comments on commit 7f30fdb

Please sign in to comment.