From fe621139a154da22281f50d999b6ae753b17c4d8 Mon Sep 17 00:00:00 2001 From: rahmat-st Date: Tue, 11 Oct 2022 13:34:25 +0700 Subject: [PATCH 1/2] style: update delete prompt on file-desc --- client/src/components/file-desc/Desc.css | 56 +++++++++++++++++++----- client/src/components/file-desc/Desc.jsx | 27 +++++++----- 2 files changed, 61 insertions(+), 22 deletions(-) diff --git a/client/src/components/file-desc/Desc.css b/client/src/components/file-desc/Desc.css index 162bab1..5f79356 100644 --- a/client/src/components/file-desc/Desc.css +++ b/client/src/components/file-desc/Desc.css @@ -247,20 +247,52 @@ cursor: pointer; } -.toast-button{ - width: 60px; - height: 30px; - margin-left: 10px; - border: none; - border-radius: 5px; - background-color: var(--secondary-color); - color: rgb(0, 0, 0); - font-family: PolySans Neutral; - font-size: 15px; +.delete-prompt-body { + text-align: center; + padding-top: 16px; +} +.delete-prompt-body__icon { + font-size: 120px; + color: orange; +} +.delete-prompt-body__title { + font-size: 28px; + margin-bottom: 16px; +} +.delete-prompt-body__description { + font-size: 18px; + line-height: 28px; +} +.delete-prompt-body__description b { + color: var(--secondary-color) +} + +.delete-prompt-action { + display: flex; + justify-content: center; + gap: 8px; + margin: 48px 0 24px; +} + +.btn-toast { + padding: 6px 12px; + border-radius: 5px; + font-family: PolySans Neutral; + font-size: 15px; +} +.btn-toast__secondary { + background-color: transparent; + border: 2px solid #c8c8c8; + color: #c8c8c8; +} +.btn-toast__danger { + background-color: #ff5151; + border: none; + color: white; } -.toast-button:hover{ - box-shadow: none; +.btn-toast:hover{ + box-shadow: none; } @media screen and (max-width: 450px){ diff --git a/client/src/components/file-desc/Desc.jsx b/client/src/components/file-desc/Desc.jsx index ae6e1c9..8e413f4 100644 --- a/client/src/components/file-desc/Desc.jsx +++ b/client/src/components/file-desc/Desc.jsx @@ -65,17 +65,24 @@ function Desc() { function deletePrompt() { toast((t) => ( - - Deleting this file will remove it permanently. - - - +
+
+ ⚠️ +

Are you sure?

+

+ Deleting this file will remove it permanently. +

+
+
+ + +
+
), { - icon: '⚠️', style: { borderRadius: '5px', background: '#333', From 510997f81d77744100132baf292a6c0fb9bb05bf Mon Sep 17 00:00:00 2001 From: rahmat-st Date: Tue, 11 Oct 2022 13:37:16 +0700 Subject: [PATCH 2/2] refactor: tab to space indentation --- client/src/components/file-desc/Desc.css | 48 ++++++++++++------------ client/src/components/file-desc/Desc.jsx | 34 ++++++++--------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/client/src/components/file-desc/Desc.css b/client/src/components/file-desc/Desc.css index 5f79356..cf65b18 100644 --- a/client/src/components/file-desc/Desc.css +++ b/client/src/components/file-desc/Desc.css @@ -248,51 +248,51 @@ } .delete-prompt-body { - text-align: center; - padding-top: 16px; + text-align: center; + padding-top: 16px; } .delete-prompt-body__icon { - font-size: 120px; - color: orange; + font-size: 120px; + color: orange; } .delete-prompt-body__title { - font-size: 28px; - margin-bottom: 16px; + font-size: 28px; + margin-bottom: 16px; } .delete-prompt-body__description { - font-size: 18px; - line-height: 28px; + font-size: 18px; + line-height: 28px; } .delete-prompt-body__description b { - color: var(--secondary-color) + color: var(--secondary-color) } .delete-prompt-action { - display: flex; - justify-content: center; - gap: 8px; - margin: 48px 0 24px; + display: flex; + justify-content: center; + gap: 8px; + margin: 48px 0 24px; } .btn-toast { - padding: 6px 12px; - border-radius: 5px; - font-family: PolySans Neutral; - font-size: 15px; + padding: 6px 12px; + border-radius: 5px; + font-family: PolySans Neutral; + font-size: 15px; } .btn-toast__secondary { - background-color: transparent; - border: 2px solid #c8c8c8; - color: #c8c8c8; + background-color: transparent; + border: 2px solid #c8c8c8; + color: #c8c8c8; } .btn-toast__danger { - background-color: #ff5151; - border: none; - color: white; + background-color: #ff5151; + border: none; + color: white; } .btn-toast:hover{ - box-shadow: none; + box-shadow: none; } @media screen and (max-width: 450px){ diff --git a/client/src/components/file-desc/Desc.jsx b/client/src/components/file-desc/Desc.jsx index 8e413f4..cb82af4 100644 --- a/client/src/components/file-desc/Desc.jsx +++ b/client/src/components/file-desc/Desc.jsx @@ -65,23 +65,23 @@ function Desc() { function deletePrompt() { toast((t) => ( -
-
- ⚠️ -

Are you sure?

-

- Deleting this file will remove it permanently. -

-
-
- - -
-
+
+
+ ⚠️ +

Are you sure?

+

+ Deleting this file will remove it permanently. +

+
+
+ + +
+
), { style: { borderRadius: '5px',