Use new CW class in more places

This commit is contained in:
Claire
2024-09-22 20:54:11 +02:00
parent 4d754935a9
commit 7c148ed1cb
2 changed files with 24 additions and 48 deletions

View File

@@ -6,7 +6,8 @@ export const ContentWarning: React.FC<{
text: string;
expanded?: boolean;
onClick?: () => void;
}> = ({ text, expanded, onClick }) => (
icons?: React.ReactNode[];
}> = ({ text, expanded, onClick, icons }) => (
<p>
<span dangerouslySetInnerHTML={{ __html: text }} className='translate' />{' '}
<button
@@ -20,6 +21,7 @@ export const ContentWarning: React.FC<{
) : (
<FormattedMessage id='status.show_more' defaultMessage='Show more' />
)}
{icons}
</button>
</p>
);