File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
pageComponents/shared/portableText/components/news Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export const Content = ({
21
21
...rest
22
22
} : ContentProps ) => {
23
23
const contentClassNames = `
24
- ${ ! hasColumns && ! hasImage ? 'px-layout-lg' : '' }
24
+ ${ ! hasColumns && ! hasImage ? 'px-layout-lg max-w-viewport mx-auto ' : '' }
25
25
${ hasColumns && ! hasImage ? 'px-layout-sm' : '' }
26
26
${
27
27
hasImage
Original file line number Diff line number Diff line change 1
1
import { toPlainText } from '@portabletext/react'
2
- import Img from 'next/image'
3
2
import { FactBox } from '@components'
4
3
import type { FactImagePosition } from '@components'
5
4
import type { PortableTextBlock } from '@portabletext/types'
6
5
import type { BackgroundColours , ImageWithAlt } from '../../../../../types/types'
7
6
import { urlFor } from '../../../../../common/helpers'
8
7
import Blocks from '../../Blocks'
9
8
import { Typography } from '@core/Typography'
9
+ import Image from '../../../SanityImage'
10
10
11
11
type FactboxProps = {
12
12
title : string
@@ -51,7 +51,7 @@ export const Fact = (block: BlockProps) => {
51
51
>
52
52
{ imageSrc && (
53
53
< FactBox . Image imagePosition = { imagePosition } >
54
- < Img src = { imageSrc } alt = { image . alt ? image . alt : 'FactBox' } style = { { objectFit : 'cover' } } fill />
54
+ < Image image = { image } fill />
55
55
</ FactBox . Image >
56
56
) }
57
57
@@ -67,7 +67,7 @@ export const Fact = (block: BlockProps) => {
67
67
{ title }
68
68
</ Typography >
69
69
) }
70
- < FactBox . Text hasColumns = { hasColumns } >
70
+ < FactBox . Text >
71
71
< Blocks
72
72
value = { content }
73
73
className = { `prose ${ hasColumns ? 'max-w-none lg:columns-2 lg:[column-gap:theme(spacing.24)]' : '' } ` }
You can’t perform that action at this time.
0 commit comments