mirror of
https://github.com/pterodactyl/panel.git
synced 2026-11-30 11:25:52 -05:00
Co-authored-by: Anthony <anthony@infraly.co> Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
29 lines
944 B
TypeScript
29 lines
944 B
TypeScript
import Button from '@/components/elements/Button';
|
|
import CopyOnClick from '@/components/elements/CopyOnClick';
|
|
|
|
interface Props {
|
|
apiKey: string;
|
|
onClose: () => void;
|
|
}
|
|
|
|
export default function ApiKeyModalContent({ apiKey, onClose }: Props) {
|
|
return (
|
|
<>
|
|
<p className={'text-sm mb-6'}>
|
|
The API key you have requested is shown below. Please store this in a safe location, it will not be
|
|
shown again.
|
|
</p>
|
|
<pre className={'overflow-x-scroll text-sm bg-muted rounded-sm py-2 px-4 font-mono'}>
|
|
<CopyOnClick text={apiKey}>
|
|
<code className={'font-mono'}>{apiKey}</code>
|
|
</CopyOnClick>
|
|
</pre>
|
|
<div className={'flex justify-end mt-6'}>
|
|
<Button type={'button'} onClick={onClose}>
|
|
Close
|
|
</Button>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|