1
0
mirror of https://github.com/SomboChea/ui synced 2024-11-06 06:34:27 +07:00
verdaccio-ui/src/components/Spinner/styles.ts

25 lines
623 B
TypeScript
Raw Normal View History

import styled from '@emotion/styled';
2019-02-03 17:23:33 +07:00
import CircularProgress from '../../muiComponents/CircularProgress';
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;
}
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
export const Circular = styled(CircularProgress)<{ theme?: Theme }>(props => ({
color: props.theme && props.theme.palette.primary.main,
}));