ghost-keychain/packages/extension-ui/src/components/Main.tsx
2022-01-01 09:26:35 +02:00

41 lines
874 B
TypeScript

// Copyright 2019-2022 @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;
}
function Main ({ children, className }: Props): React.ReactElement<Props> {
return (
<main className={className}>
{children}
</main>
);
}
export default styled(Main)(({ theme }: ThemeProps) => `
display: flex;
flex-direction: column;
height: calc(100vh - 2px);
background: ${theme.background};
color: ${theme.textColor};
font-size: ${theme.fontSize};
line-height: ${theme.lineHeight};
border: 1px solid ${theme.inputBorderColor};
* {
font-family: ${theme.fontFamily};
}
> * {
padding-left: 24px;
padding-right: 24px;
}
`);