import React, { useState } from 'react' import { Button, Typography } from 'antd' const { Text } = Typography export const SpoilerButton = ({ text, children, style }) => { const [opened, setOpened] = useState(false) return ( <> {opened && children} ) } export const ReplyButton = ({ text, children, style }) => { const [opened, setOpened] = useState(false) return ( <> { setOpened(!opened) }} style={style} > {text} {opened && children} ) }