Files
pterodactyl-panel/resources/scripts/components/dashboard/ApiKeyModalContent.tsx
T
6c0413e39b Start 2.0 development
Co-authored-by: Anthony <anthony@infraly.co>
Co-authored-by: Sky Mulley <daniel.mulley@outlook.com>
2026-10-05 18:10:18 -04:00

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>
</>
);
}