import { styled } from '../../styles';
import { InlineFlex } from '../InlineFlex';

export const CopyText = styled(InlineFlex)<{
  copied: boolean;
  tooltip: string;
}>`
  position: relative;
  cursor: pointer;

  &::after {
    content: '${({ tooltip }) => tooltip}';
    position: absolute;
    top: -18px;
    right: -13px;
    margin: 0;
    padding: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border-radius: 8px;
    font-size: 9px;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
    opacity: ${(props) => (props.copied ? 1 : 0)};
  }
`;
