Skip to content

Commit

Permalink
fix: use svgr setting for img role
Browse files Browse the repository at this point in the history
Signed-off-by: Hidde de Vries <[email protected]>
  • Loading branch information
hidde committed Dec 13, 2024
1 parent 40bd4fd commit 1d02c63
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/ComponentAnatomy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { AnatomyList, AnatomyListItem } from './AnatomyList';
interface IllustrationProps {
className?: string;
height?: boolean;
role?: string;
}

interface ComponentAnatomyProps {
Expand All @@ -33,7 +32,7 @@ export const ComponentAnatomy = ({
<Suspense fallback={null}>
<figure className={clsx('component-anatomy')}>
{AnatomyIllustration && (
<AnatomyIllustration role="img" height={null} className={clsx('component-anatomy__illustration')} />
<AnatomyIllustration height={null} className={clsx('component-anatomy__illustration')} />
)}
{AnatomyIllustration && AnatomyLegend && (
<figcaption>
Expand Down
4 changes: 4 additions & 0 deletions svgr.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// .svgrrc.js
module.exports = {
svgProps: { role: 'img' },
};

0 comments on commit 1d02c63

Please sign in to comment.