summaryrefslogtreecommitdiff
path: root/admin/src/components/Button
diff options
context:
space:
mode:
authorrohan09-raj <[email protected]>2022-08-14 00:19:58 +0530
committerrohan09-raj <[email protected]>2022-08-14 00:19:58 +0530
commit4e99bfe1878620769d48532b182692e51c7266ef (patch)
treec3b02c73fd5f9fba85461e00db9905ee1371a8a0 /admin/src/components/Button
parent3673947d4905948de2e466a813019b1de9629bd2 (diff)
admin panel and api integration
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;
+}