Update EmbedSpoiler.tsx

This commit is contained in:
Skythrew 2022-09-19 18:18:40 +02:00 committed by GitHub
parent 7221f233b1
commit e48bc58a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,11 +1,16 @@
import classNames from "classnames";
import { useState } from "preact/hooks";
import { API } from "revolt.js";
import styles from "./Embed.module.scss";
export default function EmbedSpoiler(){
const [visible, setVisible] = useState(true);
return (
<div className={classNames(styles.spoiler_container)}>
<div className={classNames(styles.spoiler_container, visible ? null : styles.hidden)} onClick={() => setVisible(!visible)}>
<h1 className={classNames(styles.spoiler_title)}>SPOILER</h1>
</div>
);
}
}