Adjust preimage app layout/media (#8663)

This commit is contained in:
Jaco 2022-12-31 13:28:01 +02:00 committed by GitHub
parent 732eb2e444
commit 10dc3d46d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 12 deletions

View File

@ -21,21 +21,19 @@ function Preimage ({ className, value }: Props): React.ReactElement<Props> {
const info = usePreimage(value);
return (
<tr className={ className }>
<tr className={className}>
<Hash value={value} />
<Call value={info} />
<td className='number'>
<td className='number media--1000'>
{info?.bytes && formatNumber(info.bytes.length)}
</td>
<td className='number'>
{info?.status?.type}
<td className='preimage-status together media--1200'>
<div>{info?.status?.type}</div>
{info && <Free value={info} />}
</td>
<td className='number media--1400'>
{info && info.count !== 0 && formatNumber(info.count)}
</td>
<td className='button'>
{info && <Free value={info} />}
</td>
</tr>
);
}

View File

@ -4,6 +4,7 @@
import type { SubmittableExtrinsicFunction } from '@polkadot/api/types';
import React, { useRef } from 'react';
import styled from 'styled-components';
import { Button, Table } from '@polkadot/react-components';
@ -26,10 +27,9 @@ function Hashes ({ className }: Props): React.ReactElement<Props> {
const headerRef = useRef([
[t('preimages'), 'start', 2],
[undefined, 'media--1300'],
[t('size')],
[t('status')],
[t('count'), 'media--1400'],
[]
[t('size'), 'media--1000'],
[t('status'), 'start media--1200'],
[t('count'), 'media--1400']
]);
return (
@ -54,4 +54,10 @@ function Hashes ({ className }: Props): React.ReactElement<Props> {
);
}
export default React.memo(Hashes);
export default React.memo(styled(Hashes)`
td.preimage-status {
div+.ui--Button {
margin-top: 0.25rem;
}
}
`);