Styles.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. import { makeStyles, Theme } from '@material-ui/core';
  2. export const getVectorSearchStyles = makeStyles((theme: Theme) => ({
  3. form: {
  4. display: 'flex',
  5. justifyContent: 'space-between',
  6. '& .field': {
  7. display: 'flex',
  8. flexDirection: 'column',
  9. flexBasis: '33%',
  10. padding: theme.spacing(2, 3, 4),
  11. backgroundColor: '#fff',
  12. borderRadius: theme.spacing(0.5),
  13. boxShadow: '3px 3px 10px rgba(0, 0, 0, 0.05)',
  14. '& .textarea': {
  15. border: `1px solid ${theme.palette.milvusGrey.main}`,
  16. borderRadius: theme.spacing(0.5),
  17. padding: theme.spacing(1),
  18. paddingBottom: '18px',
  19. marginTop: theme.spacing(2),
  20. },
  21. // reset default style
  22. '& .textfield': {
  23. padding: 0,
  24. fontSize: '14px',
  25. lineHeight: '20px',
  26. fontWeight: 400,
  27. '&::before': {
  28. borderBottom: 'none',
  29. },
  30. '&::after': {
  31. borderBottom: 'none',
  32. },
  33. },
  34. '& .multiline': {
  35. '& textarea': {
  36. overflow: 'auto',
  37. // change scrollbar style
  38. '&::-webkit-scrollbar': {
  39. width: '8px',
  40. },
  41. '&::-webkit-scrollbar-track': {
  42. backgroundColor: '#f9f9f9',
  43. },
  44. '&::-webkit-scrollbar-thumb': {
  45. borderRadius: '8px',
  46. backgroundColor: '#eee',
  47. },
  48. },
  49. },
  50. },
  51. '& .field-second': {
  52. flexGrow: 1,
  53. margin: theme.spacing(0, 1),
  54. },
  55. // Textfield component has more bottom space to show error msg when validation
  56. // if still set padding-bottom, the whole form space will be stretched
  57. '& .field-params': {
  58. paddingBottom: 0,
  59. },
  60. '& .text': {
  61. color: theme.palette.milvusGrey.dark,
  62. fontWeight: 500,
  63. },
  64. },
  65. selector: {
  66. width: '100%',
  67. marginTop: theme.spacing(2),
  68. },
  69. paramsWrapper: {
  70. display: 'flex',
  71. flexDirection: 'column',
  72. },
  73. toolbar: {
  74. display: 'flex',
  75. justifyContent: 'space-between',
  76. alignItems: 'center',
  77. padding: theme.spacing(2, 0),
  78. '& .left': {
  79. display: 'flex',
  80. alignItems: 'center',
  81. '& .text': {
  82. color: theme.palette.milvusGrey.main,
  83. },
  84. },
  85. '& .right': {
  86. '& .btn': {
  87. marginRight: theme.spacing(1),
  88. },
  89. '& .icon': {
  90. fontSize: '16px',
  91. },
  92. },
  93. },
  94. menuLabel: {
  95. minWidth: '108px',
  96. padding: theme.spacing(0, 1),
  97. margin: theme.spacing(0, 1),
  98. backgroundColor: '#fff',
  99. color: theme.palette.milvusGrey.dark,
  100. },
  101. menuItem: {
  102. fontWeight: 500,
  103. fontSize: '12px',
  104. lineHeight: '16px',
  105. color: theme.palette.milvusGrey.dark,
  106. },
  107. }));