mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Reorganize history page (#434)
* displayed content using tabs * fixed transparent background on table and tabs * tabs design update * overflow tabs * pagination and no results message spacing
This commit is contained in:
parent
a3e2c8ef3b
commit
aa6cceaf0e
@ -18,17 +18,29 @@
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
margin-top: var(--spacer);
|
margin-top: var(--spacer);
|
||||||
|
background-color: var(--background-content) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section {
|
.tabs div[class*='tabs'] {
|
||||||
margin-top: calc(var(--spacer) * 1.5);
|
background-color: var(--background-content);
|
||||||
}
|
}
|
||||||
|
|
||||||
.section:last-child {
|
.tabs ul[class*='tabList'] {
|
||||||
margin-bottom: 0;
|
background-color: var(--background-content);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-bottom: 0;
|
||||||
|
border-top-left-radius: var(--border-radius);
|
||||||
|
border-top-right-radius: var(--border-radius);
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow-y: hidden;
|
||||||
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sectionTitle {
|
.tabs div[class*='tabContent'] {
|
||||||
font-size: var(--font-size-h3);
|
border: 1px solid var(--border-color);
|
||||||
margin-bottom: calc(var(--spacer) / 2);
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs div[class*='tab-panel--selected'] {
|
||||||
|
margin-bottom: var(--spacer);
|
||||||
}
|
}
|
||||||
|
@ -1,56 +1,39 @@
|
|||||||
import React, { ReactElement, ReactNode } from 'react'
|
import React, { ReactElement } from 'react'
|
||||||
import ComputeJobs from './ComputeJobs'
|
import ComputeJobs from './ComputeJobs'
|
||||||
import styles from './index.module.css'
|
import styles from './index.module.css'
|
||||||
import PoolShares from './PoolShares'
|
import PoolShares from './PoolShares'
|
||||||
import PoolTransactions from '../../molecules/PoolTransactions'
|
import PoolTransactions from '../../molecules/PoolTransactions'
|
||||||
import PublishedList from './PublishedList'
|
import PublishedList from './PublishedList'
|
||||||
import Downloads from './Downloads'
|
import Downloads from './Downloads'
|
||||||
|
import Tabs from '../../atoms/Tabs'
|
||||||
|
|
||||||
const sections = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
title: 'Published',
|
title: 'Published',
|
||||||
component: <PublishedList />
|
content: <PublishedList />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Pool Shares',
|
title: 'Pool Shares',
|
||||||
component: <PoolShares />
|
content: <PoolShares />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Pool Transactions',
|
title: 'Pool Transactions',
|
||||||
component: <PoolTransactions />
|
content: <PoolTransactions />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Downloads',
|
title: 'Downloads',
|
||||||
component: <Downloads />
|
content: <Downloads />
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Compute Jobs',
|
title: 'Compute Jobs',
|
||||||
component: <ComputeJobs />
|
content: <ComputeJobs />
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
const Section = ({
|
|
||||||
title,
|
|
||||||
component
|
|
||||||
}: {
|
|
||||||
title: string
|
|
||||||
component: ReactNode
|
|
||||||
}) => {
|
|
||||||
return (
|
|
||||||
<div className={styles.section}>
|
|
||||||
<h2 className={styles.sectionTitle}>{title}</h2>
|
|
||||||
{component}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function HistoryPage(): ReactElement {
|
export default function HistoryPage(): ReactElement {
|
||||||
return (
|
return (
|
||||||
<article className={styles.content}>
|
<article className={styles.content}>
|
||||||
{sections.map((section) => {
|
<Tabs items={tabs} className={styles.tabs} />
|
||||||
const { title, component } = section
|
|
||||||
return <Section key={title} title={title} component={component} />
|
|
||||||
})}
|
|
||||||
</article>
|
</article>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
--font-color-text: #41474e;
|
--font-color-text: #41474e;
|
||||||
--font-color-heading: #141414;
|
--font-color-heading: #141414;
|
||||||
--background-body: #fff;
|
--background-body: #fff;
|
||||||
|
--background-content: #fff;
|
||||||
--background-body-transparent: rgba(255, 255, 255, 0.8);
|
--background-body-transparent: rgba(255, 255, 255, 0.8);
|
||||||
--background-highlight: #f7f7f7;
|
--background-highlight: #f7f7f7;
|
||||||
--border-color: #e2e2e2;
|
--border-color: #e2e2e2;
|
||||||
@ -70,6 +71,7 @@
|
|||||||
.dark {
|
.dark {
|
||||||
--font-color-text: #e2e2e2;
|
--font-color-text: #e2e2e2;
|
||||||
--font-color-heading: #f7f7f7;
|
--font-color-heading: #f7f7f7;
|
||||||
|
--background-content: #141414;
|
||||||
--background-body: #141414;
|
--background-body: #141414;
|
||||||
--background-body-transparent: rgba(20, 20, 20, 0.9);
|
--background-body-transparent: rgba(20, 20, 20, 0.9);
|
||||||
--background-highlight: #201f1f;
|
--background-highlight: #201f1f;
|
||||||
|
Loading…
Reference in New Issue
Block a user