Skip to content

Commit

Permalink
feat(Announcements): Allow markdown inside content
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Sep 5, 2024
1 parent 1496484 commit fa181da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Announcements/AnnouncementsDialogContent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React, { FC } from 'react'

import { useI18n } from 'cozy-ui/transpiled/react/providers/I18n'
import Typography from 'cozy-ui/transpiled/react/Typography'
import Buttons from 'cozy-ui/transpiled/react/Buttons'
import Markdown from 'cozy-ui/transpiled/react/Markdown'

import { Announcement } from './types'
import { useAnnouncementsImage } from 'hooks/useAnnouncementsImage'
Expand Down Expand Up @@ -65,9 +67,9 @@ const AnnouncementsDialogContent: FC<AnnouncementsDialogContentProps> = ({
t('AnnouncementsDialogContent.dateFormat')
)}
</Typography>
<Typography align="center" className="u-mb-1">
{announcement.attributes.content}
</Typography>
<div className="u-ta-center u-maw-100">
<Markdown content={announcement.attributes.content} />
</div>
{announcement.attributes.main_action ? (
<Buttons
className="u-mb-half"
Expand Down

0 comments on commit fa181da

Please sign in to comment.