Skip to content

Commit

Permalink
fix(neuron-ui): set the font-size of footer to 12px
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Aug 7, 2019
1 parent 0e2709c commit c250678
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
19 changes: 5 additions & 14 deletions packages/neuron-ui/src/containers/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const stackStyles = {
],
}
const stackItemStyles = {
root: [theme.fonts.small],
root: [theme.fonts.xSmall],
}

export const SyncStatus = ({
Expand All @@ -28,13 +28,13 @@ export const SyncStatus = ({
}: React.PropsWithoutRef<{ tipBlockNumber: string; syncedBlockNumber: string; bufferBlockNumber?: number }>) => {
const [t] = useTranslation()
if (tipBlockNumber === '') {
return <Text variant="small">{t('footer.fail-to-fetch-tip-block-number')}</Text>
return <Text variant="xSmall">{t('footer.fail-to-fetch-tip-block-number')}</Text>
}

const percentage = +syncedBlockNumber / +tipBlockNumber

return (
<div style={{ display: 'flex', alignItems: 'center', fontSize: theme.fonts.small.fontSize }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
{+syncedBlockNumber + bufferBlockNumber < +tipBlockNumber ? (
<>
{t('sync.syncing')}
Expand All @@ -52,21 +52,12 @@ export const SyncStatus = ({

export const NetworkStatus = ({ name, online }: { name: string; online: boolean }) => {
return (
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 5 }}>
<Stack horizontal verticalAlign="center" tokens={{ childrenGap: 5 }} styles={stackItemStyles}>
<Icon
iconName={online ? 'Connected' : 'Disconnected'}
styles={{ root: { display: 'flex', alignItems: 'center' } }}
/>
<Text
styles={{
root: {
fontSize: '14px',
lineHeight: '14px',
},
}}
>
{name}
</Text>
<Text variant="xSmall">{name}</Text>
</Stack>
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-ui/src/utils/loadTheme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { registerIcons } from 'utils/icons'
loadTheme({
fonts: {
tiny: { fontSize: '11px' },
xSmall: { fontSize: '12px' },
xSmall: { fontSize: '12px', lineHeight: '12px' },
small: { fontSize: '14px' },
smallPlus: { fontSize: '15px' },
medium: { fontSize: '16px' },
Expand Down

0 comments on commit c250678

Please sign in to comment.