import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Eye, EyeOff } from 'lucide-react'; import { Button } from '../Button/Button'; import { CodeBlock } from '../CodeBlock/CodeBlock'; import styles from './RevealableCodeBlock.module.css'; export interface RevealableCodeBlockProps { code: string; language?: string; } /** A CodeBlock that starts hidden; the code is only rendered after the user reveals it. */ export function RevealableCodeBlock({ code, language }: RevealableCodeBlockProps) { const { t } = useTranslation(); const [revealed, setRevealed] = useState(false); return (
{t('revealable.hidden')}
)}