From c28c43fb5dcbdafd2497bf4e3913914ef124f574 Mon Sep 17 00:00:00 2001 From: Padmaja Date: Wed, 10 Apr 2024 18:05:07 +0530 Subject: [PATCH] Padms/2179 (#2232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor FigCaption to tailwind #2179 * ♻️ Some more changes use mt-2 #2179 * 🔥 Cleanup #2179 * 🚨 Lint warnings #2179 --- web/components/src/FigureCaption/Attribution.tsx | 1 + web/components/src/FigureCaption/FigureCaption.tsx | 11 +++-------- web/pageComponents/shared/Hero/FiftyFiftyHero.tsx | 1 - web/pageComponents/shared/textTeaser/TextTeaser.tsx | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/web/components/src/FigureCaption/Attribution.tsx b/web/components/src/FigureCaption/Attribution.tsx index 053ec2035..d160d6db3 100644 --- a/web/components/src/FigureCaption/Attribution.tsx +++ b/web/components/src/FigureCaption/Attribution.tsx @@ -1,4 +1,5 @@ import { forwardRef, HTMLAttributes } from 'react' + export type AttributionProps = HTMLAttributes export const Attribution = forwardRef(function ({ children, ...rest }, ref) { diff --git a/web/components/src/FigureCaption/FigureCaption.tsx b/web/components/src/FigureCaption/FigureCaption.tsx index 6c6eb4133..ff6335c66 100644 --- a/web/components/src/FigureCaption/FigureCaption.tsx +++ b/web/components/src/FigureCaption/FigureCaption.tsx @@ -1,16 +1,11 @@ -import { forwardRef, HTMLAttributes } from 'react' +import { HTMLAttributes } from 'react' import { twMerge } from 'tailwind-merge' export type FigureCaptionProps = { size?: 'small' | 'medium' } & HTMLAttributes -export const FigureCaption = forwardRef(function FigureCaption({ - size = 'small', - children, - className, - ...rest -}) { +export const FigureCaption = ({ size = 'small', children, className, ...rest }: FigureCaptionProps) => { return (
(functio {children}
) -}) +} diff --git a/web/pageComponents/shared/Hero/FiftyFiftyHero.tsx b/web/pageComponents/shared/Hero/FiftyFiftyHero.tsx index 8ac1f44cf..527b2fbc5 100644 --- a/web/pageComponents/shared/Hero/FiftyFiftyHero.tsx +++ b/web/pageComponents/shared/Hero/FiftyFiftyHero.tsx @@ -4,7 +4,6 @@ import TitleText from '../portableText/TitleText' import type { HeroType } from '../../../types/types' import { BackgroundContainer } from '@components' import ReadMoreLink from '../ReadMoreLink' -import RichText from '../portableText/RichText' import Blocks from '../portableText/Blocks' const StyledHero = styled(BackgroundContainer)` diff --git a/web/pageComponents/shared/textTeaser/TextTeaser.tsx b/web/pageComponents/shared/textTeaser/TextTeaser.tsx index 42d013fe3..88f9b112c 100644 --- a/web/pageComponents/shared/textTeaser/TextTeaser.tsx +++ b/web/pageComponents/shared/textTeaser/TextTeaser.tsx @@ -1,4 +1,4 @@ -import { Teaser as EnvisTeaser, Link, BackgroundContainer } from '@components' +import { Teaser as EnvisTeaser, BackgroundContainer } from '@components' import styled from 'styled-components' import IngressText from '../portableText/IngressText' import TitleText from '../portableText/TitleText'