misc_pterodactyl-panel/resources/scripts/components/elements/InputSpinner.tsx
Dane Everitt f30dab053b
Support much better server querying from frontend
Search all servers if making a query as an admin, allow searching by a more complex set of data, fix unfocus on search field when loading indicator was rendered
2020-10-15 21:21:38 -07:00

17 lines
575 B
TypeScript

import React from 'react';
import Spinner from '@/components/elements/Spinner';
import Fade from '@/components/elements/Fade';
import tw from 'twin.macro';
const InputSpinner = ({ visible, children }: { visible: boolean, children: React.ReactNode }) => (
<div css={tw`relative`}>
<Fade appear unmountOnExit in={visible} timeout={150}>
<div css={tw`absolute right-0 h-full flex items-center justify-end pr-3`}>
<Spinner size={'small'}/>
</div>
</Fade>
{children}
</div>
);
export default InputSpinner;