Просмотр исходного кода

Added warning to delete namespace modal

jnfrati 4 лет назад
Родитель
Сommit
34a4cf4ce3

+ 1 - 1
dashboard/src/main/home/Home.tsx

@@ -515,7 +515,7 @@ class Home extends Component<PropsType, StateType> {
           <Modal
             onRequestClose={() => setCurrentModal(null, null)}
             width="700px"
-            height="250px"
+            height="280px"
           >
             <DeleteNamespaceModal />
           </Modal>

+ 23 - 2
dashboard/src/main/home/modals/DeleteNamespaceModal.tsx

@@ -73,7 +73,10 @@ const DeleteNamespaceModal = () => {
           width="480px"
         />
       </InputWrapper>
-
+      <Warning highlight={true}>
+        ⚠️ Deleting this namespace will remove all resources attached to this
+        namespace.
+      </Warning>
       <SaveButton
         text="Delete Namespace"
         color="#e62659"
@@ -115,7 +118,7 @@ const DashboardIcon = styled.div`
 const InputWrapper = styled.div`
   display: flex;
   align-items: center;
-  margin-bottom: 30px;
+  margin-bottom: 15px;
 `;
 
 const Subtitle = styled.div`
@@ -177,3 +180,21 @@ const StyledUpdateProjectModal = styled.div`
   border-radius: 6px;
   background: #202227;
 `;
+
+const Warning = styled.div`
+  font-size: 13px;
+  display: flex;
+  border-radius: 3px;
+  width: calc(100%);
+  margin-top: 10px;
+  margin-left: 2px;
+  line-height: 1.4em;
+  align-items: center;
+  color: white;
+  > i {
+    margin-right: 10px;
+    font-size: 18px;
+  }
+  color: ${(props: { highlight: boolean; makeFlush?: boolean }) =>
+    props.highlight ? "#f5cb42" : ""};
+`;