Sfoglia il codice sorgente

made adaptive heigth in connectors config component (#1583)

Co-authored-by: Anton Zorin <zorii4@Antons-MacBook-Pro.local>
Zorii4 3 anni fa
parent
commit
445dc3e270

+ 0 - 4
kafka-ui-react-app/src/components/Connect/Details/Config/Config.tsx

@@ -28,10 +28,7 @@ export interface ConfigProps {
 }
 
 const ConnectConfigWrapper = styled.div`
-  padding: 16px;
   margin: 16px;
-  border: 1px solid ${({ theme }) => theme.layout.stuffColor};
-  border-radius: 8px;
 `;
 
 const Config: React.FC<ConfigProps> = ({
@@ -50,7 +47,6 @@ const Config: React.FC<ConfigProps> = ({
   }
 
   if (!config) return null;
-
   return (
     <ConnectConfigWrapper>
       <Editor

+ 0 - 3
kafka-ui-react-app/src/components/Connect/Details/Config/__test__/__snapshots__/Config.spec.tsx.snap

@@ -2,10 +2,7 @@
 
 exports[`Config view matches snapshot 1`] = `
 .c0 {
-  padding: 16px;
   margin: 16px;
-  border: 1px solid #F1F2F3;
-  border-radius: 8px;
 }
 
 <div

+ 1 - 1
kafka-ui-react-app/src/components/common/Editor/Editor.tsx

@@ -29,7 +29,7 @@ const Editor = React.forwardRef<ReactAce | null, EditorProps>((props, ref) => {
       fontSize={14}
       height={
         isFixedHeight
-          ? `${(props.value?.split('\n').length || 32) * 16}px`
+          ? `${(props.value?.split('\n').length || 32) * 19}px`
           : '372px'
       }
       wrapEnabled