Files
pterodactyl-panel/resources/scripts/components/elements/InputSpinner.tsx
T

18 lines
587 B
TypeScript
Raw Normal View History

import React from 'react';
import Spinner from '@/components/elements/Spinner';
2026-10-05 18:10:18 -04:00
import { cn } from '@/lib/cn';
const InputSpinner = ({ visible, children }: { visible: boolean; children: React.ReactNode }) => (
2026-10-05 18:10:18 -04:00
// 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>
2026-10-05 18:10:18 -04:00
)}
{children}
2026-10-05 18:10:18 -04:00
</div>
);
export default InputSpinner;