// Copyright 2019-2021 @polkadot/extension-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 import React from 'react'; import styled from 'styled-components'; import useTranslation from '../../hooks/useTranslation'; interface Props { className?: string; bytes: string; url: string; } function Bytes ({ bytes, className, url }: Props): React.ReactElement { const { t } = useTranslation(); return (
{t('from')} {url}
{t('bytes')} {bytes}
); } export default styled(Bytes)` border: 0; display: block; font-size: 0.75rem; margin-top: 0.75rem; td.data { max-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; vertical-align: middle; width: 100%; pre { font-family: inherit; font-size: 0.75rem; margin: 0; } } td.label { opacity: 0.5; padding: 0 0.5rem; text-align: right; vertical-align: middle; white-space: nowrap; } `;