import { FC, useState } from "react"; import { useTranslation } from "react-i18next"; import styled from "styled-components"; import Box from "../../../../../Styled/Box"; import { RawButton } from "../../../../../Styled/Button"; import Icon, { StyledIcon } from "../../../../../Styled/Icon"; import { TextSpan } from "../../../../../Styled/Text"; import Spacing from "../../../../../Styled/Spacing"; import Clipboard from "../../../../Clipboard"; import { IShareUrlRef } from "../ShareUrl"; interface IEmbedSectionProps { shareUrl: IShareUrlRef | null; } export const EmbedSection: FC = ({ shareUrl }) => { const { t } = useTranslation(); const [isOpen, setIsOpen] = useState(false); const iframeCode = shareUrl?.url && shareUrl.url.length > 0 ? `` : ""; return ( setIsOpen((prev) => !prev)}> {t("share.embedTitle")} {isOpen && ( <> {t("share.embedDescription")} )} ); }; const Explanation = styled(TextSpan)` opacity: 0.8; `;