1
0
Fork 1
mirror of https://github.com/SomboChea/ui synced 2024-06-28 14:05:33 +07:00
verdaccio-ui/src/components/Spinner/styles.ts
Priscila Oliveira af8ed8b3e3 fix: introduced ForwardRef (#177)
* refactor: introduced forwardref - circular progress

* refactor: replaced HTMLElementTagNameMap with HTMLElementDiv

* fix: fixed func name
2019-10-12 09:54:52 +02:00

31 lines
619 B
TypeScript

import styled, { css } from 'react-emotion';
import colors from '../../utils/styles/colors';
import CircularProgress from '../../muiComponents/CircularProgress';
interface WrapperProps {
centered: boolean;
}
export const Wrapper = styled('div')`
&& {
display: flex;
align-items: center;
justify-content: center;
${(props: WrapperProps) =>
props.centered &&
css`
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
`};
}
`;
export const Circular = styled(CircularProgress)({
'&&': {
color: colors.primary,
},
});