// Copyright 2017-2021 @polkadot/app-staking authors & contributors // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import styled from 'styled-components'; import { Badge, Icon } from '@polkadot/react-components'; import { useTranslation } from './translate'; interface Props { className?: string; isRelay?: boolean; } function Legend ({ className, isRelay }: Props): React.ReactElement { const { t } = useTranslation(); return (
{t('Next session')} {isRelay && ( {t('Para validator')} )} {t('Produced blocks')} } /> {t('Online message')} {t('Nominating')} {t('Oversubscribed')} {t('Slashed')} {t('Blocks nominations')}
); } export default React.memo(styled(Legend)` font-size: 0.85rem; padding: 1rem 0.5rem; text-align: center; .ui--Badge { margin-right: 0.5rem; } span+span { margin-left: 1rem; } `);