diff --git a/src/components/button/button.jsx b/src/components/button/button.jsx
index e991737..51a75dd 100644
--- a/src/components/button/button.jsx
+++ b/src/components/button/button.jsx
@@ -215,4 +215,37 @@ function OutlinedButton({ className, title, icon, size, ...props }) {
);
}
-export { OutlinedButton, PrimaryButton, SecondaryButton };
+/* Dangerous Button */
+
+const StyledDangerousButton = styled(BaseButton)`
+ padding: 0 24px;
+ background-color: ${Colors.red(600)};
+ color: white;
+
+ &:hover {
+ background-color: ${Colors.red(700)};
+ }
+
+ &:active {
+ background-color: ${Colors.red(800)};
+ }
+
+ &:focus {
+ background-color: ${Colors.red(800)};
+ box-shadow: 0 0 0 1px ${Colors.red(900)} inset;
+ }
+
+ &:disabled {
+ background-color: ${Colors.gray(300)};
+ }
+`;
+
+function DangerousButton({ title, size, ...props }) {
+ return (
+
+ {title}
+
+ );
+}
+
+export { DangerousButton, OutlinedButton, PrimaryButton, SecondaryButton };
diff --git a/src/components/color/colors.js b/src/components/color/colors.js
index 4c876bc..3560f9c 100644
--- a/src/components/color/colors.js
+++ b/src/components/color/colors.js
@@ -18,6 +18,9 @@ const Colors = {
gray: function (value) {
return `var(--color-gray-${shade({ value })})`;
},
+ red: function (value) {
+ return `var(--color-red-${shade({ value })})`;
+ },
error: "var(--color-error)",
surface: "var(--color-surface)",
};
diff --git a/src/pages/messages-page.jsx b/src/pages/messages-page.jsx
index f4827b7..5584178 100644
--- a/src/pages/messages-page.jsx
+++ b/src/pages/messages-page.jsx
@@ -1,7 +1,11 @@
import { useEffect, useMemo, useState } from "react";
import { useLocation, useNavigate, useParams } from "react-router";
import styled from "styled-components";
-import { OutlinedButton, PrimaryButton } from "../components/button/button";
+import {
+ DangerousButton,
+ OutlinedButton,
+ PrimaryButton,
+} from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import BACKGROUND_COLOR from "../components/color/background-color";
import {
@@ -74,14 +78,14 @@ function ViewerButtons({ onEdit }) {
function EditingButtons({ onDelete, onCancel }) {
return (
-
diff --git a/src/styles/colors.css b/src/styles/colors.css
index 608d4f9..91e7602 100644
--- a/src/styles/colors.css
+++ b/src/styles/colors.css
@@ -1,9 +1,4 @@
:root {
- /* Semantics */
-
- --color-error: #dc3a3a;
- --color-surface: #f6f8ff;
-
/* Palette */
--color-purple-100: #f8f0ff;
@@ -43,4 +38,19 @@
--color-gray-700: #3a3a3a;
--color-gray-800: #2b2b2b;
--color-gray-900: #181818;
+
+ --color-red-100: #fef2f2;
+ --color-red-200: #fecaca;
+ --color-red-300: #fca5a5;
+ --color-red-400: #f87171;
+ --color-red-500: #dc3a3a;
+ --color-red-600: #dc2626;
+ --color-red-700: #b91c1c;
+ --color-red-800: #991b1b;
+ --color-red-900: #7f1d1d;
+
+ /* Semantics */
+
+ --color-error: var(--color-red-500);
+ --color-surface: #f6f8ff;
}
diff --git a/src/tests/test-api-page.jsx b/src/tests/test-api-page.jsx
index 2ed9272..ef9c366 100644
--- a/src/tests/test-api-page.jsx
+++ b/src/tests/test-api-page.jsx
@@ -1,6 +1,6 @@
import { useCallback, useEffect, useState } from "react";
import styled from "styled-components";
-import { PrimaryButton } from "../components/button/button";
+import { DangerousButton, PrimaryButton } from "../components/button/button";
import BUTTON_SIZE from "../components/button/button-size";
import Colors from "../components/color/colors";
import {
@@ -250,23 +250,13 @@ function TestApiPage() {
/>
-
-
+
+
+
+
+
+
+