// Copyright 2019-2022 @polkadot/extension-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { ThemeProps } from '../types'; import { faCopy } from '@fortawesome/free-regular-svg-icons'; import React, { MouseEventHandler } from 'react'; import styled from 'styled-components'; import useTranslation from '../hooks/useTranslation'; import ActionText from './ActionText'; import TextAreaWithLabel from './TextAreaWithLabel'; interface Props { seed: string; onCopy: MouseEventHandler; className?: string; } function MnemonicSeed ({ className, onCopy, seed }: Props): React.ReactElement { const { t } = useTranslation(); return (
('Generated 12-word mnemonic seed:')} value={seed} />
('Copy to clipboard')} />
); } export default styled(MnemonicSeed)(({ theme }: ThemeProps) => ` margin-bottom: 21px; .buttonsRow { display: flex; flex-direction: row; .copyBtn { margin-right: 32px; } } .mnemonicDisplay { textarea { color: ${theme.primaryColor}; font-size: ${theme.fontSize}; height: unset; letter-spacing: -0.01em; line-height: ${theme.lineHeight}; margin-bottom: 10px; padding: 14px; } } `);