ghost-keychain/packages/extension-ui/src/components/Label.tsx
Thibaut Sardan 2b9274c40f
Add network selector when importing an account with mnemonic, and refactor (#627)
* add network selector and refactor

* fr trad that didnot apprear before

* with useRef

* font-size

* nit still failing

* and that work .. but not what I need

* giving up on the test :(
2021-01-25 18:20:35 +01:00

36 lines
779 B
TypeScript

// Copyright 2019-2021 @polkadot/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ThemeProps } from '../types';
import React from 'react';
import styled from 'styled-components';
interface Props {
children: React.ReactNode;
className?: string;
label: string;
}
function Label ({ children, className, label }: Props): React.ReactElement<Props> {
return (
<div className={className}>
<label>{label}</label>
{children}
</div>
);
}
export default styled(Label)(({ theme }: ThemeProps) => `
color: ${theme.textColor};
label {
font-size: ${theme.inputLabelFontSize};
line-height: 14px;
letter-spacing: 0.04em;
opacity: 0.65;
margin-bottom: 12px;
text-transform: uppercase;
}
`);