diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-06-26 10:51:06 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-06-26 10:51:06 +0200 |
commit | 0dec7575221e86f39439b249a5da6044c1a0a9b4 (patch) | |
tree | 8d2a0a9530f860402cfdb0bd823acec12950a2ab /components | |
parent | 38222cb9d104521afbbd229224ad0d76b8d2b02e (diff) |
new timeline.ts schema + editor (pretty much) done
Diffstat (limited to 'components')
-rw-r--r-- | components/fadethrough.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/components/fadethrough.tsx b/components/fadethrough.tsx new file mode 100644 index 0000000..5f5d06c --- /dev/null +++ b/components/fadethrough.tsx @@ -0,0 +1,18 @@ +import Fade from '@material-ui/core/Fade'; +import Grow from '@material-ui/core/Grow'; +import { ReactNode } from 'react'; + +export default function FadeThroughTransition(props: { + from: ReactNode; + to: ReactNode; + show: boolean; +}) { + return <div className='posabs a0 fadethrough'> + <Grow in={props.show} timeout={500}> + <div className='posabs a0 to'>{props.to}</div> + </Grow> + <Fade in={!props.show}> + <div className='posabs a0 from'>{props.from}</div> + </Fade> + </div>; +} |