Skip to content

Commit

Permalink
feat: added table component
Browse files Browse the repository at this point in the history
  • Loading branch information
BLuEScioN committed Feb 28, 2025
1 parent 7061635 commit efb6f63
Show file tree
Hide file tree
Showing 31 changed files with 2,698 additions and 72 deletions.
1 change: 1 addition & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config: StorybookConfig = {
'@chromatic-com/storybook',
'@storybook/addon-interactions',
'storybook-addon-next-router',
'@storybook/addon-viewport',
],
framework: {
name: '@storybook/nextjs',
Expand Down
4 changes: 4 additions & 0 deletions .storybook/manager.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#storybook-root {
width: 100% !important;
}

3 changes: 3 additions & 0 deletions .storybook/preview.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#storybook-root, .sb-show-main {
width: 100% !important;
}
5 changes: 2 additions & 3 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { ChakraProvider, defaultSystem } from '@chakra-ui/react';
import { withThemeByClassName } from '@storybook/addon-themes';
import type { Preview } from '@storybook/react';
import { AppRouterContext } from 'next/dist/shared/lib/app-router-context.shared-runtime';
import React, { useEffect } from 'react';

import { DesktopColorModeButton } from '../src/app/_components/NavBar/DesktopColorModeButton';
import { Providers } from '../src/app/_components/Providers';
import {
instrumentSans,
Expand All @@ -13,6 +11,7 @@ import {
matterRegular,
openSauce,
} from '../src/common/fonts';
import './preview.css';

const preview: Preview = {
globalTypes: {
Expand Down Expand Up @@ -67,7 +66,7 @@ const preview: Preview = {
<main
className={`${inter.variable} ${instrumentSans.variable} ${openSauce.variable} ${matterRegular.variable} ${matterMonoRegular.variable}`}
>
<Story />
<Story w="100%" className="preview-story" />
</main>
</Providers>
);
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@stacks/transactions": "6.15.1-pr.0bcf867e.0+0bcf867e",
"@storybook/addon-themes": "^8.4.7",
"@tanstack/react-query": "5.8.4",
"@tanstack/react-table": "^8.21.2",
"@tippyjs/react": "4.2.6",
"@types/cookie": "0.5.2",
"@types/react-redux": "7.1.26",
Expand Down Expand Up @@ -133,6 +134,7 @@
"@storybook/addon-interactions": "8.3.5",
"@storybook/addon-links": "8.3.5",
"@storybook/addon-onboarding": "8.3.5",
"@storybook/addon-viewport": "^8.5.6",
"@storybook/blocks": "8.3.5",
"@storybook/experimental-nextjs-vite": "8.5.2",
"@storybook/nextjs": "8.3.5",
Expand Down
30 changes: 30 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/no-txs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/stx-circle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/stx-square.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions src/app/PageClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import { ReactNode } from 'react';
import { DEFAULT_LIST_LIMIT_SMALL } from '../common/constants/constants';
import { useGlobalContext } from '../common/context/useGlobalContext';
import { TxListTabs } from '../features/txs-list/tabs/TxListTabs';
import { HomePageBlockListSkeleton } from './_components/BlockList/Grouped/skeleton';
import { PageTitle } from './_components/PageTitle';
import { Stats } from './_components/Stats/Stats';
import HomePageSkeleton from './skeleton';

const HomePageBlockListDynamic = dynamic(
() =>
Expand Down
2 changes: 1 addition & 1 deletion src/app/_components/NewFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const TopFooterContent = () => {
<Box hideFrom="lg" className="top-footer-content-hide-from-lg">
<Grid templateColumns={['repeat(2, 1fr)', 'repeat(2, 1fr)', 'repeat(3, 1fr)']} gap={4}>
{rightSideLinks.concat(leftSideLinks).map(link => (
<ExplorerLink href={link.href} fontWeight="medium" fontSize="xs">
<ExplorerLink key={link.label} href={link.href} fontWeight="medium" fontSize="xs">

Check warning on line 108 in src/app/_components/NewFooter.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/_components/NewFooter.tsx#L108

Added line #L108 was not covered by tests
{link.label}
</ExplorerLink>
))}
Expand Down
4 changes: 3 additions & 1 deletion src/app/transactions/PageClient.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use client';

import { TxsTable } from '@/common/components/table/table-examples/TxsTable';
import { TxListTabs } from '@/features/txs-list/tabs/TxListTabs';

Check warning on line 4 in src/app/transactions/PageClient.tsx

View check run for this annotation

Codecov / codecov/patch

src/app/transactions/PageClient.tsx#L3-L4

Added lines #L3 - L4 were not covered by tests
import { Flex } from '@chakra-ui/react';

import { TokenPrice } from '../../common/types/tokenPrice';
import { TxListTabs } from '../../features/txs-list/tabs/TxListTabs';
import { PageTitle } from '../_components/PageTitle';
import { FilterProps } from '../search/filters';
import { MempoolFeeStatsWithErrorBoundary } from './MempoolFeeStats';
Expand All @@ -14,6 +15,7 @@ export default function ({ tokenPrice, filters }: { tokenPrice: TokenPrice } & F
<Flex justifyContent={'space-between'} alignItems={'flex-end'}>
<PageTitle>Transactions</PageTitle>
</Flex>
<TxsTable />
<MempoolFeeStatsWithErrorBoundary tokenPrice={tokenPrice} />
<TxListTabs filters={filters} />
</>
Expand Down
Loading

0 comments on commit efb6f63

Please sign in to comment.