From 2fbecc461b88a65990af243bd5095288e4700381 Mon Sep 17 00:00:00 2001 From: macqbat Date: Mon, 4 Jul 2022 16:24:26 +0200 Subject: [PATCH] feat: [console-lite] - trade screen - bunch of animations (#706) * feat: [console-lite] - trade screen - bunch of animations * feat: [console-lite] - trade screen - bunch of animations Co-authored-by: maciek --- .../components/deal-ticket/baubles-decor.tsx | 36 +++++++++++++ .../deal-ticket/deal-ticket-container.tsx | 53 +++++++++++-------- .../src/app/components/header/comet.tsx | 4 +- .../src/app/components/header/video.tsx | 19 +++++-- .../src/app/components/icons/star.tsx | 20 +++++++ .../src/vega-custom-classes.js | 3 ++ 6 files changed, 107 insertions(+), 28 deletions(-) create mode 100644 apps/simple-trading-app/src/app/components/deal-ticket/baubles-decor.tsx create mode 100644 apps/simple-trading-app/src/app/components/icons/star.tsx diff --git a/apps/simple-trading-app/src/app/components/deal-ticket/baubles-decor.tsx b/apps/simple-trading-app/src/app/components/deal-ticket/baubles-decor.tsx new file mode 100644 index 000000000..b63193229 --- /dev/null +++ b/apps/simple-trading-app/src/app/components/deal-ticket/baubles-decor.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import Video from '../header/video'; +import Comet from '../header/comet'; +import Star from '../icons/star'; + +const Baubles = () => { + return ( +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ ); +}; + +export default Baubles; diff --git a/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-container.tsx b/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-container.tsx index 14cda9ae5..a1ee371a9 100644 --- a/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-container.tsx +++ b/apps/simple-trading-app/src/app/components/deal-ticket/deal-ticket-container.tsx @@ -1,3 +1,4 @@ +import * as React from 'react'; import { useParams } from 'react-router-dom'; import { DealTicketManager, @@ -8,6 +9,7 @@ import { useVegaWallet } from '@vegaprotocol/wallet'; import { gql, useQuery } from '@apollo/client'; import { DealTicketBalance } from './deal-ticket-balance'; import type { PartyBalanceQuery } from './__generated__/PartyBalanceQuery'; +import Baubles from './baubles-decor'; const tempEmptyText =

Please select a market from the markets page

; @@ -39,27 +41,34 @@ export const DealTicketContainer = () => { } ); - return marketId ? ( - - {(data) => ( - - {loading ? ( - 'Loading...' - ) : ( - - )} - - - )} - - ) : ( - tempEmptyText + return ( +
+
+ {marketId ? ( + + {(data) => ( + + {loading ? ( + 'Loading...' + ) : ( + + )} + + + )} + + ) : ( + tempEmptyText + )} +
+ +
); }; diff --git a/apps/simple-trading-app/src/app/components/header/comet.tsx b/apps/simple-trading-app/src/app/components/header/comet.tsx index 7532117c1..3ade42c31 100644 --- a/apps/simple-trading-app/src/app/components/header/comet.tsx +++ b/apps/simple-trading-app/src/app/components/header/comet.tsx @@ -5,9 +5,9 @@ const Comet = () => { - + diff --git a/apps/simple-trading-app/src/app/components/header/video.tsx b/apps/simple-trading-app/src/app/components/header/video.tsx index 0aa238ce9..3e91e439f 100644 --- a/apps/simple-trading-app/src/app/components/header/video.tsx +++ b/apps/simple-trading-app/src/app/components/header/video.tsx @@ -1,15 +1,26 @@ import React from 'react'; +import classNames from 'classnames'; -const Video = () => { +interface Props { + width: number; + height: number; + className: string; +} + +const Video = ({ width = 60, height = 60, className = '' }: Partial) => { return (