From 258ecf71f18624dbdc43ebb46c7a76fa629ceaf0 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 26 Oct 2022 20:59:35 +0300 Subject: [PATCH] fix(ideal-image): do not pass down `img` prop (#8250) --- .../src/theme/IdealImage/index.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx index fbf2d3278a9b..8886a6e7992e 100644 --- a/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx +++ b/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx @@ -81,25 +81,19 @@ function getMessage(icon: IconKey, state: State) { } export default function IdealImage(props: Props): JSX.Element { - const {alt, className, img} = props; + const {img, ...propsRest} = props; // In dev env just use regular img with original file if (typeof img === 'string' || 'default' in img) { return ( - {alt} + // eslint-disable-next-line jsx-a11y/alt-text + ); } return (