import React from 'react'; import LinkSmall from '../icons/LinkSmall'; import Close from '../icons/Close'; import { CopyButton } from '../CopyButton'; import styles from './styles.scss'; export const SaveSuccess = ({ snippetId, formatUrl = (id: string) => `${window.parent.location.href}&snippet=${id}`, onClose, }) => { const url = formatUrl(snippetId); return ( <> {'Saved! '} (e.target as HTMLInputElement).select()} className={styles.urlPreview} readOnly type="text" value={url} /> } source={url} /> ); };