-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButton.jsx
More file actions
68 lines (67 loc) · 1.96 KB
/
Button.jsx
File metadata and controls
68 lines (67 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import * as React from 'react';
import Image from 'next/image';
import Link from 'next/link';
export const Button = ({ logo, onClick, text, type }) => {
return (
<>
{type == 'normal' ? (
<button
className="h-fit w-full rounded-md border border-2 border-neutral-900 bg-[#C3A982] px-5 py-2 text-base font-bold text-gray-900 hover:bg-[#89724E] hover:text-white"
onClick={onClick}
>
{text}
</button>
) : (
<></>
)}
{type == 'submit' ? (
<button
className="h-fit w-full rounded-md border border-2 border-neutral-900 bg-[#A4DAAC] px-5 py-2 text-base font-bold text-gray-900 hover:bg-[#54825B] hover:text-white"
onClick={onClick}
>
{text}
</button>
) : (
<></>
)}
{type == 'cancel' ? (
<button
className="h-fit w-full rounded-md border border-2 border-neutral-900 bg-[#C26666] px-5 py-2 text-base font-bold text-gray-900 hover:bg-[#8B3B3B] hover:text-white"
onClick={onClick}
>
{text}
</button>
) : (
<></>
)}
{type == 'white' ? (
<button
className="h-fit w-full rounded-md border border-2 border-neutral-900 bg-[#FFFFFF] px-5 py-2 text-base font-bold text-gray-900 hover:bg-[#CDCDCD]"
onClick={onClick}
>
{text}
</button>
) : (
<></>
)}
{type == 'count' ? (
<button
className="h-8 w-max flex items-center px-2 rounded-md border border-2 border-neutral-900 bg-[#C3A982] text-base font-bold text-gray-900 hover:bg-[#89724E] hover:text-white"
onClick={onClick}
>
{logo ? <Image
src={logo}
className="w-full"
alt=""
width={30}
height={30}
quality={100}
/> : <></>}
{text}
</button>
) : (
<></>
)}
</>
);
};