QueryForm.styled.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import styled, { css } from 'styled-components';
  2. import BaseSQLEditor from 'components/common/SQLEditor/SQLEditor';
  3. export const QueryWrapper = styled.div`
  4. padding: 16px;
  5. `;
  6. export const KSQLInputsWrapper = styled.div`
  7. display: flex;
  8. gap: 24px;
  9. padding-bottom: 16px;
  10. @media screen and (max-width: 769px) {
  11. flex-direction: column;
  12. }
  13. `;
  14. export const KSQLInputHeader = styled.div`
  15. display: flex;
  16. justify-content: space-between;
  17. color: ${({ theme }) => theme.default.color.normal};
  18. `;
  19. export const InputsContainer = styled.div`
  20. display: grid;
  21. grid-template-columns: 1fr 1fr 30px;
  22. align-items: center;
  23. gap: 10px;
  24. `;
  25. export const Fieldset = styled.fieldset`
  26. display: flex;
  27. flex: 1;
  28. flex-direction: column;
  29. gap: 8px;
  30. color: ${({ theme }) => theme.default.color.normal};
  31. `;
  32. export const ButtonsContainer = styled.div`
  33. display: flex;
  34. gap: 8px;
  35. `;
  36. export const SQLEditor = styled(BaseSQLEditor)(
  37. ({ readOnly, theme }) =>
  38. css`
  39. background: ${readOnly && theme.ksqlDb.query.editor.readonly.background};
  40. .ace-cursor {
  41. ${readOnly && `background: ${theme.default.transparentColor} `}
  42. }
  43. .ace_content {
  44. background-color: ${theme.default.backgroundColor};
  45. color: ${theme.default.color.normal};
  46. }
  47. .ace_line {
  48. background-color: ${theme.ksqlDb.query.editor.activeLine
  49. .backgroundColor};
  50. }
  51. .ace_gutter-cell {
  52. background-color: ${theme.ksqlDb.query.editor.cell.backgroundColor};
  53. }
  54. .ace_gutter-layer {
  55. background-color: ${theme.ksqlDb.query.editor.layer.backgroundColor};
  56. color: ${theme.default.color.normal};
  57. }
  58. .ace_cursor {
  59. color: ${theme.ksqlDb.query.editor.cursor};
  60. }
  61. .ace_print-margin {
  62. display: none;
  63. }
  64. `
  65. );