Skip to content

Commit f535c71

Browse files
committed
fixed spacing of side-by-side detail elements
1 parent 11ccd21 commit f535c71

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

packages/insight/src/components/block-details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ const BlockDetails: FC<BlockDetailsProps> = ({currency, network, block}) => {
163163
onClick={() =>
164164
summary.previousBlockHash ? gotoBlock(summary.previousBlockHash) : null
165165
}>
166-
{(summary.height > 0) ? summary.height - 1 : "None"}
166+
{(summary.height > 0) ? summary.height - 1 : 'None'}
167167
</span>
168168
</TileLink>
169169
</Tile>

packages/insight/src/components/data-box.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import {Children, FC, ReactNode} from "react";
2-
import {useTheme} from "styled-components";
1+
import {Children, FC, ReactNode} from 'react';
2+
import {useTheme} from 'styled-components';
33

4-
const DataBox: FC<{children: ReactNode, label: string}> = ({children, label}) => {
4+
const DataBox: FC<{children: ReactNode, label: string, style?: object}> = ({children, label, style}) => {
55
const theme = useTheme();
66
const modifiedChildren = typeof children === 'object'
77
? Children.map(children as JSX.Element, (child: JSX.Element) => {
@@ -11,15 +11,17 @@ const DataBox: FC<{children: ReactNode, label: string}> = ({children, label}) =>
1111

1212
return (
1313
<fieldset style={{
14-
border: `1.5px solid ${theme.dark ? '#5f5f5f' : '#ccc'}`,
14+
border: `2.5px solid ${theme.dark ? '#5f5f5f' : '#ccc'}`,
1515
borderRadius: '5px',
1616
padding: '0.1rem 0.4rem',
1717
wordBreak: 'break-all',
1818
whiteSpace: 'normal',
1919
width: 'fit-content',
20-
height: 'fit-content'
20+
height: 'fit-content',
21+
margin: '0.7rem 0.2rem',
22+
...style
2123
}}>
22-
<legend style={{margin: '-0.2rem 0.1rem'}}>{label}</legend>
24+
<legend style={{fontWeight: 'bold', color: 'gray', margin: '-0.2rem 0.1rem'}}>{label}</legend>
2325
{modifiedChildren}
2426
</fieldset>
2527
);

packages/insight/src/components/transaction-details.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,21 +214,20 @@ const TransactionDetails: FC<TransactionDetailsProps> = ({
214214
</TextElipsis>
215215
</DataBox>
216216

217-
<span style={{display: 'flex'}}>
218-
<DataBox label='Tx Index'>
217+
<div style={{display: 'flex', gap: '0.7rem', margin: '0 0.2rem'}}>
218+
<DataBox label='Tx Index' style={{margin: 0}}>
219219
<TextElipsis>
220220
{item.mintIndex}
221221
</TextElipsis>
222222
</DataBox>
223-
224223
{item.uiConfirmations && confirmations > 0 ? (
225-
<DataBox label='Confirmations'>
224+
<DataBox label='Confirmations' style={{margin: 0}}>
226225
<ScriptText>
227226
{item.uiConfirmations + confirmations}
228227
</ScriptText>
229228
</DataBox>
230229
) : null}
231-
</span>
230+
</div>
232231

233232
{item.script && (
234233
<>

0 commit comments

Comments
 (0)