-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adjust width of Merchant table and Protocol History table
- Loading branch information
Showing
8 changed files
with
66 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
...omponents/proof-of-reserve/components/merchant-table/components/merchant-table-header.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
src/app/components/proof-of-reserve/components/merchant-table/merchant-table-layout.tsx
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/app/components/proof-of-reserve/components/merchant-table/merchant-table.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { useBreakpointValue } from '@chakra-ui/react'; | ||
import { GenericTableBody } from '@components/generic-table/components/generic-table-body'; | ||
import { GenericTableHeader } from '@components/generic-table/components/generic-table-header'; | ||
import { GenericTableHeaderText } from '@components/generic-table/components/generic-table-header-text'; | ||
import { GenericTableLayout } from '@components/generic-table/components/generic-table-layout'; | ||
|
||
import { MerchantTableItem } from './components/merchant-table-item'; | ||
|
||
interface MerchantTableProps { | ||
items?: any[]; | ||
} | ||
|
||
export function MerchantTable({ items }: MerchantTableProps): React.JSX.Element { | ||
const dynamicHeight = items ? items.length * 75 + 20 : 20; | ||
const isMobile = useBreakpointValue({ base: true, md: false }); | ||
return ( | ||
<GenericTableLayout | ||
height={isMobile ? 'auto' : `${dynamicHeight}px`} | ||
width={isMobile ? '100%' : '30%'} | ||
padding={isMobile ? '10px' : '15px'} | ||
isMobile={isMobile} | ||
isMerchant={true} | ||
> | ||
<GenericTableHeader> | ||
<GenericTableHeaderText w={'50%'}>Merchant</GenericTableHeaderText> | ||
<GenericTableHeaderText w={'100%'}>dlcBTC Minted</GenericTableHeaderText> | ||
</GenericTableHeader> | ||
|
||
<GenericTableBody> | ||
{items?.map(item => <MerchantTableItem key={item.merchant.name} {...item} />)} | ||
</GenericTableBody> | ||
</GenericTableLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters