1
0
mirror of https://github.com/SomboChea/ui synced 2026-01-18 00:56:00 +07:00

initial commit

This commit is contained in:
Priscila Oliveira
2019-02-03 11:23:33 +01:00
commit e2d478d65b
163 changed files with 19925 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/**
* @prettier
* @flow
*/
import React from 'react';
import type { Node } from 'react';
import { IProps } from './types';
import { Wrapper, Circular } from './styles';
const Spinner = ({ size = 50, centered = false }: IProps): Node => (
<Wrapper centered={centered}>
<Circular size={size} />
</Wrapper>
);
export default Spinner;

View File

@@ -0,0 +1,30 @@
/**
* @prettier
* @flow
*/
import styled, { css } from 'react-emotion';
import CircularProgress from '@material-ui/core/CircularProgress/index';
import colors from '../../utils/styles/colors';
export const Wrapper = styled.div`
&& {
display: flex;
align-items: center;
justify-content: center;
${props =>
props.centered &&
css`
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
`};
}
`;
export const Circular = styled(CircularProgress)`
&& {
color: ${colors.primary};
}
`;

View File

@@ -0,0 +1,9 @@
/**
* @prettier
* @flow
*/
export interface IProps {
size?: number;
centered?: boolean;
}