Skip to content

Commit

Permalink
[C] FigCaption accept richtext
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgoff committed Feb 19, 2024
1 parent d5885d5 commit f0c3913
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/epo-react-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rubin-epo/epo-react-lib",
"description": "Rubin Observatory Education & Public Outreach team React UI library.",
"version": "1.2.13",
"version": "1.2.14",
"author": "Rubin EPO",
"license": "MIT",
"homepage": "https://lsst-epo.github.io/epo-react-lib",
Expand Down
4 changes: 3 additions & 1 deletion packages/epo-react-lib/src/atomic/Figure/Figure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const Figure: FunctionComponent<FigureProps> = ({
}) => (
<Styled.Figure $withBackground={withBackground} className={className}>
{children}
{caption && <Styled.FigCaption>{caption}</Styled.FigCaption>}
{caption && (
<Styled.FigCaption dangerouslySetInnerHTML={{ __html: caption }} />
)}
</Styled.Figure>
);

Expand Down

0 comments on commit f0c3913

Please sign in to comment.