styles.tsx 1.1 KB

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