8337cb251f
* Link to comments & highlight comment * Copy link, show toast and fade bg * Remove unused imports * Standardize link copied toast * Add linking to answer comment threads * Refactor open answers component, use indigo highlight * Distinguish chosen answer a bit more
22 lines
674 B
TypeScript
22 lines
674 B
TypeScript
import { ClipboardCopyIcon } from '@heroicons/react/outline'
|
|
import React from 'react'
|
|
import clsx from 'clsx'
|
|
import { Row } from 'web/components/layout/row'
|
|
|
|
export function ToastClipboard(props: { className?: string }) {
|
|
const { className } = props
|
|
return (
|
|
<Row
|
|
className={clsx(
|
|
'border-base-300 absolute items-center' +
|
|
'gap-2 divide-x divide-gray-200 rounded-md border-2 bg-white ' +
|
|
'h-15 w-[15rem] p-2 pr-3 text-gray-500',
|
|
className
|
|
)}
|
|
>
|
|
<ClipboardCopyIcon height={20} className={'mr-2 self-center'} />
|
|
<div className="pl-4 text-sm font-normal">Link copied to clipboard!</div>
|
|
</Row>
|
|
)
|
|
}
|