ghost-portal/packages/react-components/src/Chart/Base.tsx
2021-01-03 11:33:39 +01:00

26 lines
590 B
TypeScript

// Copyright 2017-2021 @polkadot/react-components authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { BaseProps } from './types';
import React from 'react';
import styled from 'styled-components';
const Wrapper = styled.div`
position: relative;
display: inline-block;
padding: 1em 1em 0;
height: 15vw;
width: 15vw;
`;
function BaseChart ({ children, className = '' }: BaseProps): React.ReactElement<BaseProps> {
return (
<Wrapper className={`ui--Chart ${className}`}>
{children}
</Wrapper>
);
}
export default React.memo(BaseChart);