Skip to content

Commit a620845

Browse files
committed
Add text wrap to image descriptions
1 parent 1f03731 commit a620845

File tree

1 file changed

+3
-2
lines changed
  • src/app/(frontend)/[locale]/projects/[id]

1 file changed

+3
-2
lines changed

src/app/(frontend)/[locale]/projects/[id]/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ function DesktopImage(img: ProjectImage): ReactNode {
5555
)}
5656
{img.description && img.deskConf.descPos && (
5757
<figcaption
58-
className={`${descTopOrBottom ? 'max-w-9/10 absolute' : 'max-w-2/5'} ${descPos === 'n' ? 'bottom-21/20' : descPos === 's' ? 'top-21/20' : ''}`}
58+
className={`text-pretty! ${descTopOrBottom ? 'max-w-9/10 absolute' : 'max-w-2/5'} ${descPos === 'n' ? 'bottom-21/20' : descPos === 's' ? 'top-21/20' : ''}`}
59+
style={{ textWrap: 'balance' }}
5960
>
6061
<RichText
6162
data={img.description}
@@ -114,7 +115,7 @@ function PhoneImage(img: ProjectImage): ReactNode {
114115
}
115116
/>
116117
{img.description && img.phoneConf.descPos && (
117-
<figcaption className="max-w-9/10 mx-auto">
118+
<figcaption className="max-w-9/10 mx-auto text-pretty!" style={{ textWrap: 'balance' }}>
118119
<RichText
119120
data={img.description}
120121
className="img-description"

0 commit comments

Comments
 (0)