mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-18 14:26:39 +00:00
feat: separate table header
This commit is contained in:
parent
60379eb2bd
commit
fc9d9c1f3e
@ -3,10 +3,11 @@ import { OptionsIcon } from '@status-im/icons'
|
|||||||
import { useEffect, useMemo, useState } from 'react'
|
import { useEffect, useMemo, useState } from 'react'
|
||||||
import { YStack, XStack } from 'tamagui'
|
import { YStack, XStack } from 'tamagui'
|
||||||
|
|
||||||
|
import { VALIDATORS_DATA, VALIDATOR_TABS_MANAGEMENT } from '../../../constants'
|
||||||
import ValidatorProfile from '../../../components/General/ValidatorProfile'
|
import ValidatorProfile from '../../../components/General/ValidatorProfile'
|
||||||
import SearchManagement from './SearchManagement'
|
import SearchManagement from './SearchManagement'
|
||||||
import DropdownFilter from './DropdownFilter'
|
import DropdownFilter from './DropdownFilter'
|
||||||
import { VALIDATORS_DATA, VALIDATOR_TABS_MANAGEMENT } from '../../../constants'
|
import ManagementTableHeader from './ManagementTableHeader'
|
||||||
import './ManagementTable.css'
|
import './ManagementTable.css'
|
||||||
|
|
||||||
type ManagementTableProps = {
|
type ManagementTableProps = {
|
||||||
@ -67,49 +68,7 @@ const ManagementTable = ({ tab, searchValue, changeSearchValue }: ManagementTabl
|
|||||||
<DropdownFilter />
|
<DropdownFilter />
|
||||||
</XStack>
|
</XStack>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<ManagementTableHeader validatorsAmount={filteredValidators.length} />
|
||||||
<tr>
|
|
||||||
<th>
|
|
||||||
<Checkbox id="table" variant="outline" />
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
{filteredValidators.length} Validators
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
Balance
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
Income
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
Proposals
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
Attestations
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
Effectiveness
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
<Text size={15} color={'#647084'}>
|
|
||||||
Status
|
|
||||||
</Text>
|
|
||||||
</th>
|
|
||||||
<th></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
<tbody>
|
||||||
{filteredValidators.map((validator, index) => (
|
{filteredValidators.map((validator, index) => (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
|
@ -0,0 +1,55 @@
|
|||||||
|
import { Checkbox, Text } from '@status-im/components'
|
||||||
|
|
||||||
|
type ManagementTableHeaderProps = {
|
||||||
|
validatorsAmount: number
|
||||||
|
}
|
||||||
|
|
||||||
|
const ManagementTableHeader = ({ validatorsAmount }: ManagementTableHeaderProps) => {
|
||||||
|
return (
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>
|
||||||
|
<Checkbox id="table" variant="outline" />
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
{validatorsAmount} Validators
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
Balance
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
Income
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
Proposals
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
Attestations
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
Effectiveness
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<Text size={15} color={'#647084'}>
|
||||||
|
Status
|
||||||
|
</Text>
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ManagementTableHeader
|
Loading…
x
Reference in New Issue
Block a user