1
0
puyopuyotetr.is/app/javascript/flavours/glitch/components/content_warning.tsx
Eugen Rochko 7d97e3d82f [Glitch] Change how content warnings and filters are displayed in web UI
Partially apply 500f4925a5 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2024-09-22 19:31:22 +02:00

16 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>
);