mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-29 08:29:03 +01:00
15 lines
381 B
TypeScript
15 lines
381 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.Yellow}
|
|
>
|
|
<p dangerouslySetInnerHTML={{ __html: text }} />
|
|
</StatusBanner>
|
|
);
|