mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Add very simple search support to pages, togglable with "k"
This commit is contained in:
22
resources/scripts/components/elements/InputSpinner.tsx
Normal file
22
resources/scripts/components/elements/InputSpinner.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import Spinner from '@/components/elements/Spinner';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
|
||||
const InputSpinner = ({ visible, children }: { visible: boolean, children: React.ReactNode }) => (
|
||||
<div className={'relative'}>
|
||||
<CSSTransition
|
||||
timeout={250}
|
||||
in={visible}
|
||||
unmountOnExit={true}
|
||||
appear={true}
|
||||
classNames={'fade'}
|
||||
>
|
||||
<div className={'absolute pin-r h-full flex items-center justify-end pr-3'}>
|
||||
<Spinner size={'tiny'}/>
|
||||
</div>
|
||||
</CSSTransition>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
export default InputSpinner;
|
||||
Reference in New Issue
Block a user