From 15522ec9146f6f1956620355c44dea2a6a75b67c Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 9 Oct 2023 18:26:23 +0200 Subject: refactor(components): replace ResponsiveImage with Figure component The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed. --- .../molecules/images/responsive-image.test.tsx | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 src/components/molecules/images/responsive-image.test.tsx (limited to 'src/components/molecules/images/responsive-image.test.tsx') diff --git a/src/components/molecules/images/responsive-image.test.tsx b/src/components/molecules/images/responsive-image.test.tsx deleted file mode 100644 index dec36ea..0000000 --- a/src/components/molecules/images/responsive-image.test.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { describe, expect, it } from '@jest/globals'; -import { render, screen } from '../../../../tests/utils'; -import { ResponsiveImage } from './responsive-image'; - -describe('ResponsiveImage', () => { - it('renders a responsive image', () => { - render( - - ); - expect( - screen.getByRole('img', { name: 'An alternative text' }) - ).toBeInTheDocument(); - }); -}); -- cgit v1.2.3