Skip to content

Commit dcb717b

Browse files
committed
🎨 added small tweaks
1 parent 48ce6c0 commit dcb717b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

web/components/src/Fact/Content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const Content = ({
2121
...rest
2222
}: ContentProps) => {
2323
const contentClassNames = `
24-
${!hasColumns && !hasImage ? 'px-layout-lg' : ''}
24+
${!hasColumns && !hasImage ? 'px-layout-lg max-w-viewport mx-auto' : ''}
2525
${hasColumns && !hasImage ? 'px-layout-sm' : ''}
2626
${
2727
hasImage

web/pageComponents/shared/portableText/components/news/Fact.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { toPlainText } from '@portabletext/react'
2-
import Img from 'next/image'
32
import { FactBox } from '@components'
43
import type { FactImagePosition } from '@components'
54
import type { PortableTextBlock } from '@portabletext/types'
65
import type { BackgroundColours, ImageWithAlt } from '../../../../../types/types'
76
import { urlFor } from '../../../../../common/helpers'
87
import Blocks from '../../Blocks'
98
import { Typography } from '@core/Typography'
9+
import Image from '../../../SanityImage'
1010

1111
type FactboxProps = {
1212
title: string
@@ -51,7 +51,7 @@ export const Fact = (block: BlockProps) => {
5151
>
5252
{imageSrc && (
5353
<FactBox.Image imagePosition={imagePosition}>
54-
<Img src={imageSrc} alt={image.alt ? image.alt : 'FactBox'} style={{ objectFit: 'cover' }} fill />
54+
<Image image={image} fill />
5555
</FactBox.Image>
5656
)}
5757

@@ -67,7 +67,7 @@ export const Fact = (block: BlockProps) => {
6767
{title}
6868
</Typography>
6969
)}
70-
<FactBox.Text hasColumns={hasColumns}>
70+
<FactBox.Text>
7171
<Blocks
7272
value={content}
7373
className={`prose ${hasColumns ? 'max-w-none lg:columns-2 lg:[column-gap:theme(spacing.24)]' : ''}`}

0 commit comments

Comments
 (0)