Skip to content

Commit 28992c5

Browse files
committed
Speed up animations throughout the panel
1 parent cbdede7 commit 28992c5

File tree

12 files changed

+13
-14
lines changed

12 files changed

+13
-14
lines changed

resources/scripts/TransitionRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const TransitionRouter: React.FC = ({ children }) => (
1717
<Route
1818
render={({ location }) => (
1919
<StyledSwitchTransition>
20-
<Fade timeout={250} key={location.key} in appear unmountOnExit>
20+
<Fade timeout={150} key={location.key} in appear unmountOnExit>
2121
<section>
2222
{children}
2323
</section>

resources/scripts/components/dashboard/search/SearchModal.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ interface Values {
2222
}
2323

2424
const ServerResult = styled(Link)`
25-
${tw`flex items-center bg-neutral-900 p-4 rounded border-l-4 border-neutral-900 no-underline`};
26-
transition: all 250ms linear;
25+
${tw`flex items-center bg-neutral-900 p-4 rounded border-l-4 border-neutral-900 no-underline transition-all duration-150`};
2726
2827
&:hover {
2928
${tw`shadow border-cyan-500`};

resources/scripts/components/elements/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const DropdownMenu = ({ renderToggle, children }: Props) => {
6161
return (
6262
<div>
6363
{renderToggle(onClickHandler)}
64-
<Fade timeout={250} in={visible} unmountOnExit>
64+
<Fade timeout={150} in={visible} unmountOnExit>
6565
<div
6666
ref={menu}
6767
onClick={e => {

resources/scripts/components/elements/InputSpinner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const InputSpinner = ({ visible, children }: { visible: boolean, children: React
99
appear
1010
unmountOnExit
1111
in={visible}
12-
timeout={250}
12+
timeout={150}
1313
>
1414
<div css={tw`absolute right-0 h-full flex items-center justify-end pr-3`}>
1515
<Spinner size={'small'}/>

resources/scripts/components/elements/Modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const Modal: React.FC<Props> = ({ visible, appear, dismissable, showSpinnerOverl
6262
}, [ render ]);
6363

6464
return (
65-
<Fade timeout={250} appear={appear} in={render} unmountOnExit onExited={onDismissed}>
65+
<Fade timeout={150} appear={appear} in={render} unmountOnExit onExited={onDismissed}>
6666
<ModalMask
6767
onClick={e => {
6868
if (isDismissable && closeOnBackground) {
@@ -87,7 +87,7 @@ const Modal: React.FC<Props> = ({ visible, appear, dismissable, showSpinnerOverl
8787
<Spinner/>
8888
</div>
8989
}
90-
<div css={tw`bg-neutral-800 p-6 rounded shadow-md overflow-y-scroll transition-all duration-250`}>
90+
<div css={tw`bg-neutral-800 p-6 rounded shadow-md overflow-y-scroll transition-all duration-150`}>
9191
{children}
9292
</div>
9393
</ModalContainer>

resources/scripts/components/elements/PageContentBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { CSSTransition } from 'react-transition-group';
44
import tw from 'twin.macro';
55

66
const PageContentBlock: React.FC<{ className?: string }> = ({ children, className }) => (
7-
<CSSTransition timeout={250} classNames={'fade'} appear in>
7+
<CSSTransition timeout={150} classNames={'fade'} appear in>
88
<>
99
<ContentContainer css={tw`my-10`} className={className}>
1010
{children}

resources/scripts/components/elements/ProgressBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default () => {
6161
return (
6262
<div className={'w-full fixed'} style={{ height: '2px' }}>
6363
<CSSTransition
64-
timeout={250}
64+
timeout={150}
6565
appear
6666
in={visible}
6767
unmountOnExit

resources/scripts/components/server/WebsocketHandler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default () => {
6767

6868
return (
6969
error ?
70-
<CSSTransition timeout={250} in appear classNames={'fade'}>
70+
<CSSTransition timeout={150} in appear classNames={'fade'}>
7171
<div css={tw`bg-red-500 py-2`}>
7272
<ContentContainer css={tw`flex items-center justify-center`}>
7373
<Spinner size={'small'}/>

resources/scripts/components/server/databases/DatabasesContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default () => {
4040
{(!databases.length && loading) ?
4141
<Spinner size={'large'} centered/>
4242
:
43-
<Fade timeout={250}>
43+
<Fade timeout={150}>
4444
<>
4545
{databases.length > 0 ?
4646
databases.map((database, index) => (

resources/scripts/components/server/files/FileDropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export default ({ uuid }: { uuid: string }) => {
138138
/>
139139
<SpinnerOverlay visible={showSpinner} fixed size={'large'}/>
140140
</div>
141-
<Fade timeout={250} in={menuVisible} unmountOnExit classNames={'fade'}>
141+
<Fade timeout={150} in={menuVisible} unmountOnExit classNames={'fade'}>
142142
<div
143143
ref={menu}
144144
onClick={e => {

0 commit comments

Comments
 (0)