move View type to trading-compoments, tidy comments
This commit is contained in:
parent
da80f8848c
commit
026dd0f2c3
@ -44,7 +44,6 @@ export const GridTabs = ({ children, group }: GridTabsProps) => {
|
|||||||
className="h-full grid grid-rows-[min-content_1fr]"
|
className="h-full grid grid-rows-[min-content_1fr]"
|
||||||
onValueChange={(value) => setActiveTab(value)}
|
onValueChange={(value) => setActiveTab(value)}
|
||||||
>
|
>
|
||||||
{/* the tabs */}
|
|
||||||
<Tabs.List className="flex gap-[2px] bg-neutral-200" role="tablist">
|
<Tabs.List className="flex gap-[2px] bg-neutral-200" role="tablist">
|
||||||
{Children.map(children, (child) => {
|
{Children.map(children, (child) => {
|
||||||
if (!isValidElement(child)) return null;
|
if (!isValidElement(child)) return null;
|
||||||
@ -66,7 +65,6 @@ export const GridTabs = ({ children, group }: GridTabsProps) => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Tabs.List>
|
</Tabs.List>
|
||||||
{/* the content */}
|
|
||||||
<div className="h-full overflow-auto">
|
<div className="h-full overflow-auto">
|
||||||
{Children.map(children, (child) => {
|
{Children.map(children, (child) => {
|
||||||
if (!isValidElement(child)) return null;
|
if (!isValidElement(child)) return null;
|
||||||
|
@ -2,7 +2,7 @@ import classNames from 'classnames';
|
|||||||
import AutoSizer from 'react-virtualized-auto-sizer';
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
||||||
import { useState, ReactNode } from 'react';
|
import { useState, ReactNode } from 'react';
|
||||||
import { Market_market } from './__generated__/Market';
|
import { Market_market } from './__generated__/Market';
|
||||||
import { Views } from './trading-components';
|
import { View, Views } from './trading-components';
|
||||||
import { GridTab, GridTabs } from './grid-tabs';
|
import { GridTab, GridTabs } from './grid-tabs';
|
||||||
|
|
||||||
interface TradeGridProps {
|
interface TradeGridProps {
|
||||||
@ -74,8 +74,6 @@ const TradeGridChild = ({ children, className }: TradeGridChildProps) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
type View = keyof typeof Views;
|
|
||||||
|
|
||||||
interface TradePanelsProps {
|
interface TradePanelsProps {
|
||||||
market: Market_market;
|
market: Market_market;
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ export const Orders = () => <div>TODO: Orders</div>;
|
|||||||
export const Positions = () => <div>TODO: Positions</div>;
|
export const Positions = () => <div>TODO: Positions</div>;
|
||||||
export const Collateral = () => <div>TODO: Collateral</div>;
|
export const Collateral = () => <div>TODO: Collateral</div>;
|
||||||
|
|
||||||
|
export type View = keyof typeof Views;
|
||||||
|
|
||||||
export const Views = {
|
export const Views = {
|
||||||
chart: Chart,
|
chart: Chart,
|
||||||
ticket: Ticket,
|
ticket: Ticket,
|
||||||
|
Loading…
Reference in New Issue
Block a user