styles.tsx 431 B

1234567891011121314151617181920212223
  1. import {css} from '@emotion/react';
  2. export type ImageStyleProps = {
  3. grayscale?: boolean;
  4. round?: boolean;
  5. suggested?: boolean;
  6. };
  7. export const imageStyle = (props: ImageStyleProps) => css`
  8. position: absolute;
  9. top: 0px;
  10. left: 0px;
  11. border-radius: ${props.round ? '50%' : '3px'};
  12. ${props.grayscale &&
  13. css`
  14. padding: 1px;
  15. filter: grayscale(100%);
  16. `}
  17. ${props.suggested &&
  18. css`
  19. opacity: 50%;
  20. `}
  21. `;