QueryForm.styled.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import styled, { css } from 'styled-components';
  2. import BaseSQLEditor from 'components/common/SQLEditor/SQLEditor';
  3. import BaseEditor from 'components/common/Editor/Editor';
  4. export const QueryWrapper = styled.div`
  5. padding: 16px;
  6. `;
  7. export const KSQLInputsWrapper = styled.div`
  8. width: 100%;
  9. display: flex;
  10. gap: 24px;
  11. padding-bottom: 16px;
  12. & > div {
  13. flex-grow: 1;
  14. }
  15. `;
  16. export const KSQLInputHeader = styled.div`
  17. display: flex;
  18. justify-content: space-between;
  19. `;
  20. export const KSQLButtons = styled.div`
  21. display: flex;
  22. gap: 16px;
  23. `;
  24. export const StreamPropertiesContainer = styled.label`
  25. display: flex;
  26. flex-direction: column;
  27. gap: 10px;
  28. width: 50%;
  29. `;
  30. export const InputsContainer = styled.div`
  31. display: flex;
  32. justify-content: center;
  33. gap: 10px;
  34. `;
  35. export const StreamPropertiesInputWrapper = styled.div`
  36. & > input {
  37. height: 40px;
  38. border: 1px solid grey;
  39. border-radius: 4px;
  40. min-width: 300px;
  41. font-size: 16px;
  42. padding-left: 15px;
  43. }
  44. `;
  45. export const DeleteButtonWrapper = styled.div`
  46. min-height: 32px;
  47. display: flex;
  48. flex-direction: column;
  49. align-items: center;
  50. justify-self: flex-start;
  51. margin-top: 10px;
  52. `;
  53. export const LabelContainer = styled.div`
  54. display: flex;
  55. align-items: center;
  56. justify-content: space-between;
  57. `;
  58. export const Fieldset = styled.fieldset`
  59. width: 50%;
  60. `;
  61. export const Editor = styled(BaseEditor)(
  62. ({ readOnly, theme }) =>
  63. readOnly &&
  64. css`
  65. &,
  66. &.ace-tomorrow {
  67. background: ${theme.ksqlDb.query.editor.readonly.background};
  68. }
  69. .ace-cursor {
  70. ${theme.ksqlDb.query.editor.readonly.cursor}
  71. }
  72. `
  73. );
  74. export const SQLEditor = styled(BaseSQLEditor)(
  75. ({ readOnly, theme }) =>
  76. readOnly &&
  77. css`
  78. background: ${theme.ksqlDb.query.editor.readonly.background};
  79. .ace-cursor {
  80. ${theme.ksqlDb.query.editor.readonly.cursor}
  81. }
  82. `
  83. );