import React, { useState } from 'react' import PropTypes from 'prop-types' import { Typography, Tooltip, Button } from 'antd' import CopyButton from './CopyButton' import EyeIcon from '../../Icons/EyeIcon' import EyeSlashIcon from '../../Icons/EyeSlashIcon' const { Text } = Typography const SecretDisplay = ({ value, reveal = false }) => { const [visible, setVisible] = useState(false) if (!value) { return n/a } const masked = '•'.repeat(Math.max(8, value.length)) return ( {reveal && visible ? value : masked} {reveal && (