From 27cc9c84e6c1323c3e1f31746949680765ee1131 Mon Sep 17 00:00:00 2001 From: James Shakespeare Date: Fri, 4 Dec 2020 17:30:22 -0500 Subject: [PATCH] Adds Image and ResponsiveImage className prop (#82) * add className prop to images to override default styling * image docs elaboration * docs tweaks, fix indentation * amp-img doesn't get className; only concat classNames if prop is defined --- src/components/Image/Image.jsx | 8 +++++++- src/components/Image/Image.stories.mdx | 4 +++- src/components/ResponsiveImage/ResponsiveImage.jsx | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/Image/Image.jsx b/src/components/Image/Image.jsx index ade5d4d5..cbc0c5ea 100644 --- a/src/components/Image/Image.jsx +++ b/src/components/Image/Image.jsx @@ -38,6 +38,7 @@ ImageAmp.propTypes = { function Image ( { alt, amp, + className, fallbackHeight: height, fallbackWidth: width, loading, @@ -63,7 +64,7 @@ function Image ( { return (