styled.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import styled from 'styled-components';
  2. export const PageWrapper = styled('div')<{width: number; height: number; rotation?: number}>`
  3. direction: ltr;
  4. position: relative;
  5. overflow: visible;
  6. background-clip: content-box;
  7. display: inline-block;
  8. margin: 25px auto;
  9. width: ${props => props.width}px;
  10. height: ${props => props.height}px;
  11. transform: rotate(${props => props.rotation}deg);
  12. background-color: white;
  13. &:first-of-type {
  14. margin-top: 40px;
  15. }
  16. `;
  17. export const PdfCanvas = styled.canvas`
  18. margin: 0;
  19. display: block;
  20. width: 100%;
  21. height: 100%;
  22. `;
  23. export const TextLayer = styled.div`
  24. position: absolute;
  25. left: 0;
  26. top: 0;
  27. right: 0;
  28. bottom: 0;
  29. margin: auto;
  30. overflow: hidden;
  31. line-height: 1.0;
  32. & > span {
  33. color: transparent;
  34. position: absolute;
  35. white-space: pre;
  36. cursor: text;
  37. transform-origin: 0% 0%;
  38. }
  39. `;
  40. export const AnnotationLayer = styled.div`
  41. position: absolute;
  42. left: 0;
  43. top: 0;
  44. `;
  45. export const DrawingLayer = styled.svg`
  46. position: absolute;
  47. left: 0;
  48. top: 0;
  49. width: 100%;
  50. height: 100%;
  51. `;
  52. export const LoadingLayer = styled.div``;