styles.tsx 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import styled from "styled-components";
  2. export const StyledTextWrapper = styled.div`
  3. position: absolute;
  4. display: flex;
  5. justify-content: center;
  6. align-items: center;
  7. font-size: 12px;
  8. width: 100%;
  9. height: 100%;
  10. overflow: hidden;
  11. cursor: pointer;
  12. `;
  13. export const StyledText = styled.pre<{
  14. width: number;
  15. height: number;
  16. }>`
  17. display: flex;
  18. justify-content: center;
  19. flex-direction: column;
  20. width: ${({ width }) => width};
  21. height: ${({ height }) => height};
  22. color: ${({ theme }) => theme.SILVER};
  23. `;
  24. export const StyledForeignObject = styled.foreignObject<{
  25. width: number;
  26. height: number;
  27. }>`
  28. position: "relative" !important;
  29. pointer-events: "none" !important;
  30. width: ${({ width }) => width + "px"};
  31. height: ${({ height }) => height + "px"};
  32. `;
  33. export const StyledKey = styled.span<{
  34. objectKey?: boolean;
  35. parent?: boolean;
  36. }>`
  37. color: ${({ theme, objectKey, parent }) =>
  38. parent ? theme.ORANGE : objectKey ? theme.BLURPLE : theme.LIGHTGREEN};
  39. `;
  40. export const StyledRow = styled.div<{ width: number }>`
  41. height: fit-content;
  42. overflow: hidden;
  43. text-overflow: ellipsis;
  44. white-space: nowrap;
  45. padding: 0 auto;
  46. width: ${({ width }) => `${width - 20}px`};
  47. `;