mirror of
https://github.com/funamitech/mastodon
synced 2024-11-27 14:29:03 +09:00
16 lines
382 B
TypeScript
16 lines
382 B
TypeScript
import { StatusBanner, BannerVariant } from './status_banner';
|
|
|
|
export const ContentWarning: React.FC<{
|
|
text: string;
|
|
expanded?: boolean;
|
|
onClick?: () => void;
|
|
}> = ({ text, expanded, onClick }) => (
|
|
<StatusBanner
|
|
expanded={expanded}
|
|
onClick={onClick}
|
|
variant={BannerVariant.Warning}
|
|
>
|
|
<p dangerouslySetInnerHTML={{ __html: text }} />
|
|
</StatusBanner>
|
|
);
|