Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Commit

Permalink
Add the order book panel component.
Browse files Browse the repository at this point in the history
  • Loading branch information
fairlighteth committed Nov 20, 2020
1 parent 43ca2ef commit 6ecda50
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/TradeApp/pages/Trading.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1
import { Meta } from '@storybook/react/types-6-0'

import { Trading } from './Trading'
import Trading from './Trading'

export default {
title: 'TradeApp/Trading',
Expand Down
7 changes: 5 additions & 2 deletions src/app/TradeApp/pages/Trading.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import React from 'react'
import styled from 'styled-components'

import OrderForm from 'components/OrderForm'
// Components
import { OrderForm } from 'components/OrderForm'
import { OrderBookPanel } from 'components/OrderBookPanel'

const Wrapper = styled.div`
display: flex;
Expand All @@ -13,9 +15,10 @@ const Wrapper = styled.div`
top: var(--height-bar-default);
`

export const Trading: React.FC = () => (
const Trading: React.FC = () => (
<Wrapper>
<OrderForm />
<OrderBookPanel />
</Wrapper>
)

Expand Down
42 changes: 42 additions & 0 deletions src/components/OrderBookPanel/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import React from 'react'
import styled from 'styled-components'

// export interface TabItemType {
// readonly id: number
// title: string
// content: string
// readonly activeColor?: string
// }

// const tabItems: TabItemType[] = [
// {
// id: 1,
// title: 'BUY',
// content: '- buy component -',
// activeColor: '--color-buy',
// },
// {
// id: 2,
// title: 'SELL',
// content: '- sell component -',
// activeColor: '--color-sell',
// },
// ]

const Wrapper = styled.div`
display: flex;
padding: var(--padding-container-default);
background: none;
width: 31rem;
flex-flow: column wrap;
position: relative;
height: 100%;
border-right: 0.1rem solid var(--color-border);
`

export const OrderBookPanel: React.FC = () => (
<Wrapper>
<p>Order Book Panel</p>
{/* <Tabs tabItems={tabItems} /> */}
</Wrapper>
)
4 changes: 1 addition & 3 deletions src/components/OrderForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ const Wrapper = styled.div`
border-right: 0.1rem solid var(--color-border);
`

const OrderForm: React.FC = () => (
export const OrderForm: React.FC = () => (
<Wrapper>
<TokenPairSelector selectedPair="ETH/USDC" selectLabel="Select Pair" />
<OrderBuySell />
</Wrapper>
)

export default OrderForm

0 comments on commit 6ecda50

Please sign in to comment.