Change how content warnings and filters are displayed in web UI (#31365)
This commit is contained in:
parent
98237207e6
commit
500f4925a5
11 changed files with 281 additions and 141 deletions
15
app/javascript/mastodon/components/content_warning.tsx
Normal file
15
app/javascript/mastodon/components/content_warning.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
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>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue