Skip to content

Commit

Permalink
Padms/2179 (#2232)
Browse files Browse the repository at this point in the history
* Refactor FigCaption to tailwind #2179

* ♻️ Some more changes use mt-2 #2179

* 🔥 Cleanup #2179

* 🚨 Lint warnings #2179
  • Loading branch information
padms authored Apr 10, 2024
1 parent 697f6de commit c28c43f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions web/components/src/FigureCaption/Attribution.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { forwardRef, HTMLAttributes } from 'react'

export type AttributionProps = HTMLAttributes<HTMLDivElement>

export const Attribution = forwardRef<HTMLDivElement, AttributionProps>(function ({ children, ...rest }, ref) {
Expand Down
11 changes: 3 additions & 8 deletions web/components/src/FigureCaption/FigureCaption.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLElement>

export const FigureCaption = forwardRef<HTMLElement, FigureCaptionProps>(function FigureCaption({
size = 'small',
children,
className,
...rest
}) {
export const FigureCaption = ({ size = 'small', children, className, ...rest }: FigureCaptionProps) => {
return (
<figcaption
className={twMerge(
Expand All @@ -22,4 +17,4 @@ export const FigureCaption = forwardRef<HTMLElement, FigureCaptionProps>(functio
{children}
</figcaption>
)
})
}
1 change: 0 additions & 1 deletion web/pageComponents/shared/Hero/FiftyFiftyHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)`
Expand Down
2 changes: 1 addition & 1 deletion web/pageComponents/shared/textTeaser/TextTeaser.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit c28c43f

Please sign in to comment.