Skip to content

Commit

Permalink
chore(orderbook): update orderbook to not be scrollable (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-onthelawn authored Aug 5, 2024
1 parent e0bacfb commit fa41976
Show file tree
Hide file tree
Showing 7 changed files with 338 additions and 237 deletions.
6 changes: 4 additions & 2 deletions src/components/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ReactNode } from 'react';
import { type ReactNode, type Ref } from 'react';

import { Content, List, Root, Trigger } from '@radix-ui/react-tabs';
import styled, { css, keyframes } from 'styled-components';
Expand All @@ -25,6 +25,7 @@ export type TabItem<TabItemsValue> = {
subitems?: TabItem<TabItemsValue>[];
customTrigger?: ReactNode;
asChild?: boolean;
ref?: Ref<HTMLDivElement>;
};

type ElementProps<TabItemsValue> = {
Expand Down Expand Up @@ -126,8 +127,9 @@ export const Tabs = <TabItemsValue extends string>({

{sharedContent ?? (
<$Stack>
{items.map(({ asChild, value: childValue, content, forceMount }) => (
{items.map(({ asChild, value: childValue, content, forceMount, ref }) => (
<$Content
ref={ref}
key={childValue}
asChild={asChild}
value={childValue}
Expand Down
1 change: 1 addition & 0 deletions src/constants/orderbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ export const ORDERBOOK_HEIGHT = 756;
export const ORDERBOOK_WIDTH = 300;
export const ORDERBOOK_ROW_HEIGHT = 21;
export const ORDERBOOK_ROW_PADDING_RIGHT = 8;
export const ORDERBOOK_HEADER_HEIGHT = 70;
Loading

0 comments on commit fa41976

Please sign in to comment.