2019-11-23 19:41:14 +07:00
|
|
|
import styled from '@emotion/styled';
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-10-12 14:54:52 +07:00
|
|
|
import CircularProgress from '../../muiComponents/CircularProgress';
|
2019-11-23 19:41:14 +07:00
|
|
|
import { Theme } from '../../design-tokens/theme';
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-10-03 17:57:42 +07:00
|
|
|
interface WrapperProps {
|
|
|
|
centered: boolean;
|
|
|
|
}
|
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const Wrapper = styled('div')<WrapperProps>(props => ({
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
...(props.centered && {
|
|
|
|
position: 'absolute',
|
|
|
|
top: '50%',
|
|
|
|
left: '50%',
|
|
|
|
transform: 'translate(-50%, -50%)',
|
|
|
|
}),
|
|
|
|
}));
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const Circular = styled(CircularProgress)<{ theme?: Theme }>(props => ({
|
|
|
|
color: props.theme && props.theme.palette.primary.main,
|
|
|
|
}));
|