1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-05-19 18:01:37 +07:00
verdaccio-ui/src/components/Spinner/styles.ts

25 lines
665 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
2020-03-31 13:44:59 +07:00
export const Circular = styled(CircularProgress)<{ theme?: Theme }>(({ theme }) => ({
color: theme?.palette.type === 'dark' ? theme?.palette.white : theme?.palette.primary.main,
}));