summaryrefslogtreecommitdiff
path: root/admin/src/components/Button
diff options
context:
space:
mode:
Diffstat (limited to 'admin/src/components/Button')
-rw-r--r--admin/src/components/Button/Button.jsx20
-rw-r--r--admin/src/components/Button/Button.module.css19
2 files changed, 39 insertions, 0 deletions
diff --git a/admin/src/components/Button/Button.jsx b/admin/src/components/Button/Button.jsx
new file mode 100644
index 0000000..ed8bc20
--- /dev/null
+++ b/admin/src/components/Button/Button.jsx
@@ -0,0 +1,20 @@
+import React from 'react';
+
+import styles from './Button.module.css';
+
+const Button = ({title, onClick, color}) => {
+ return (
+ <>
+ <button
+ className={
+ color === 'green' ? styles.button__green : styles.button__red
+ }
+ onClick={onClick}
+ >
+ {title}
+ </button>
+ </>
+ );
+};
+
+export default Button;
diff --git a/admin/src/components/Button/Button.module.css b/admin/src/components/Button/Button.module.css
new file mode 100644
index 0000000..3de7c54
--- /dev/null
+++ b/admin/src/components/Button/Button.module.css
@@ -0,0 +1,19 @@
+.button__green {
+ font-size: 1rem;
+ margin: 8px;
+ padding: 20px 30px;
+ border: none;
+ border-radius: 10px;
+ background-color: rgb(35, 151, 35);
+ color: #fff;
+}
+
+.button__red {
+ font-size: 1rem;
+ margin: 8px;
+ padding: 20px 30px;
+ border: none;
+ border-radius: 10px;
+ background-color: #ff3333;
+ color: #fff;
+}