Add spoilers back.

This commit is contained in:
Paul
2021-07-10 15:55:21 +01:00
parent ef5944b065
commit 392cb23541
3 changed files with 52 additions and 93 deletions

View File

@@ -0,0 +1,33 @@
import { Text } from "preact-i18n";
import styled from "styled-components"
const Base = styled.div`
display: grid;
place-items: center;
z-index: 1;
grid-area: 1 / 1;
cursor: pointer;
user-select: none;
text-transform: uppercase;
span {
padding: 8px;
color: var(--foreground);
background: var(--primary-background);
border-radius: calc(var(--border-radius) * 4);
}
`;
interface Props {
set: (v: boolean) => void
}
export default function Spoiler({ set }: Props) {
return (
<Base onClick={() => set(false)}>
<span><Text id="app.main.channel.misc.spoiler_attachment" /></span>
</Base>
)
}