checkInIcon.tsx 537 B

1234567891011121314151617181920212223242526
  1. import styled from '@emotion/styled';
  2. type Props = {
  3. size: number | string;
  4. status: 'error' | 'ok';
  5. color?: string;
  6. };
  7. export default styled('div')<Props>`
  8. display: inline-block;
  9. position: relative;
  10. border-radius: 50%;
  11. height: ${p => p.size}px;
  12. width: ${p => p.size}px;
  13. ${p =>
  14. p.color
  15. ? `background: ${p.color};`
  16. : `background: ${
  17. p.status === 'error'
  18. ? p.theme.error
  19. : p.status === 'ok'
  20. ? p.theme.success
  21. : p.theme.disabled
  22. };`};
  23. `;