diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-31 06:32:43 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-31 06:32:43 +0800 |
commit | 4456c3ee14f5cd778e0d16ab42a3e2e34d102f23 (patch) | |
tree | 59b4d1e63c31477b96adb13fd55d44baf094208b /packages/instant/src/components/sliding_error.tsx | |
parent | a49bf353f85c22a029db3085a620f3c031b52d73 (diff) | |
download | dexon-0x-contracts-4456c3ee14f5cd778e0d16ab42a3e2e34d102f23.tar.gz dexon-0x-contracts-4456c3ee14f5cd778e0d16ab42a3e2e34d102f23.tar.zst dexon-0x-contracts-4456c3ee14f5cd778e0d16ab42a3e2e34d102f23.zip |
feat: allow for flexible position in position animation component
Diffstat (limited to 'packages/instant/src/components/sliding_error.tsx')
-rw-r--r-- | packages/instant/src/components/sliding_error.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/src/components/sliding_error.tsx b/packages/instant/src/components/sliding_error.tsx index 8f209765e..0ad11bbad 100644 --- a/packages/instant/src/components/sliding_error.tsx +++ b/packages/instant/src/components/sliding_error.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { PositionAnimationProps } from './animations/position_animation'; +import { PositionAnimationSettings } from './animations/position_animation'; import { SlideAnimation, SlideAnimationPhase } from './animations/slide_animations'; import { Container, Flex, Text } from './ui'; @@ -37,14 +37,14 @@ export interface SlidingErrorProps extends ErrorProps { } export const SlidingError: React.StatelessComponent<SlidingErrorProps> = props => { const slideAmount = '120px'; - const slideUp: PositionAnimationProps = { + const slideUp: PositionAnimationSettings = { timingFunction: 'ease-in', top: { from: slideAmount, to: '0px', }, }; - const slideDown: PositionAnimationProps = { + const slideDown: PositionAnimationSettings = { timingFunction: 'cubic-bezier(0.25, 0.1, 0.25, 1)', top: { from: '0px', @@ -53,7 +53,7 @@ export const SlidingError: React.StatelessComponent<SlidingErrorProps> = props = direction: 'forwards', }; return ( - <SlideAnimation slideIn={slideUp} slideOut={slideDown} phase={props.phase}> + <SlideAnimation position="relative" slideIn={slideUp} slideOut={slideDown} phase={props.phase}> <Error icon={props.icon} message={props.message} /> </SlideAnimation> ); |