Files
pterodactyl-panel/resources/scripts/components/elements/InputSpinner.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

18 lines
587 B
TypeScript

import React from 'react';
import Spinner from '@/components/elements/Spinner';
import { cn } from '@/lib/cn';
const InputSpinner = ({ visible, children }: { visible: boolean; children: React.ReactNode }) => (
// Hides a native select's arrow behind the spinner.
<div className={cn('relative', visible && '[&_select]:bg-none')}>
{visible && (
<div className={'absolute right-0 h-full flex items-center justify-end pr-3'}>
<Spinner size={'small'} />
</div>
)}
{children}
</div>
);
export default InputSpinner;