diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-31 06:21:58 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-31 06:21:58 +0800 |
commit | a49bf353f85c22a029db3085a620f3c031b52d73 (patch) | |
tree | 305a18cbdb2b2c5eca2d73598a8024ec6b87dfc7 /packages/instant/src/components/instant_heading.tsx | |
parent | d0a0af51306bf5e5b46fd8982c70b271212af42f (diff) | |
download | dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.tar dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.tar.gz dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.tar.bz2 dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.tar.lz dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.tar.xz dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.tar.zst dexon-sol-tools-a49bf353f85c22a029db3085a620f3c031b52d73.zip |
feat: refactor animation code
Diffstat (limited to 'packages/instant/src/components/instant_heading.tsx')
-rw-r--r-- | packages/instant/src/components/instant_heading.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 0b41d44d7..e1c2f8bc3 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -60,8 +60,8 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> { private _renderAmountsSection(): React.ReactNode { return ( <Container> - <Container marginBottom="5px">{this._placeholderOrAmount(this._ethAmount)}</Container> - <Container opacity={0.7}>{this._placeholderOrAmount(this._dollarAmount)}</Container> + <Container marginBottom="5px">{this._renderPlaceholderOrAmount(this._renderEthAmount)}</Container> + <Container opacity={0.7}>{this._renderPlaceholderOrAmount(this._renderDollarAmount)}</Container> </Container> ); } @@ -92,7 +92,7 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> { return 'I want to buy'; } - private _placeholderOrAmount(amountFunction: () => React.ReactNode): React.ReactNode { + private _renderPlaceholderOrAmount(amountFunction: () => React.ReactNode): React.ReactNode { if (this.props.quoteRequestState === AsyncProcessState.PENDING) { return <AmountPlaceholder isPulsating={true} color={PLACEHOLDER_COLOR} />; } @@ -102,7 +102,7 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> { return amountFunction(); } - private readonly _ethAmount = (): React.ReactNode => { + private readonly _renderEthAmount = (): React.ReactNode => { return ( <Text fontSize="16px" fontColor={ColorOption.white} fontWeight={500}> {format.ethBaseAmount( @@ -114,7 +114,7 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> { ); }; - private readonly _dollarAmount = (): React.ReactNode => { + private readonly _renderDollarAmount = (): React.ReactNode => { return ( <Text fontSize="16px" fontColor={ColorOption.white}> {format.ethBaseAmountInUsd( |