-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBreadcrumb.jsx
More file actions
158 lines (157 loc) · 5.38 KB
/
Breadcrumb.jsx
File metadata and controls
158 lines (157 loc) · 5.38 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import * as React from 'react';
export const Breadcrumb = ({
first,
first_name,
second,
second_name,
third,
third_name,
fourth,
fourth_name,
current,
}) => {
return (
<>
<nav class="flex" aria-label="Breadcrumb">
<ol class="inline-flex items-center space-x-1 md:space-x-3">
{first ? (
<li class="inline-flex items-center">
<a
href={first}
class="inline-flex items-center text-base font-medium text-gray-700 hover:text-[#C3A982]"
>
<svg
aria-hidden="true"
class="mr-2 h-4 w-4"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"></path>
</svg>
{first_name}
</a>
</li>) : (
<li class="inline-flex items-center">
<p
class="inline-flex items-center text-base font-medium text-gray-700"
>
<svg
aria-hidden="true"
class="mr-2 h-4 w-4"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path d="M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z"></path>
</svg>
{first_name}
</p>
</li>
)}
{second_name ? (
<li>
<div class="flex items-center">
<svg
aria-hidden="true"
class="h-6 w-6 text-gray-400"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
></path>
</svg>
<a
href={second}
class="ml-1 text-base font-medium text-gray-700 hover:text-[#C3A982] md:ml-2 "
>
{second_name}
</a>
</div>
</li>
) : (
<></>
)}
{third_name ? (
<li>
<div class="flex items-center">
<svg
aria-hidden="true"
class="h-6 w-6 text-gray-400"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
></path>
</svg>
<a
href={third}
class="ml-1 text-base font-medium text-gray-700 hover:text-[#C3A982] md:ml-2 "
>
{third_name}
</a>
</div>
</li>
) : (
<></>
)}
{fourth_name ? (
<li>
<div class="flex items-center">
<svg
aria-hidden="true"
class="h-6 w-6 text-gray-400"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
></path>
</svg>
<a
href={fourth}
class="ml-1 text-base font-medium text-gray-700 hover:text-[#C3A982] md:ml-2 "
>
{fourth_name}
</a>
</div>
</li>
) : (
<></>
)}
{current ? (<li aria-current="page">
<div class="flex items-center">
<svg
aria-hidden="true"
class="h-6 w-6 text-gray-400"
fill="currentColor"
viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"
></path>
</svg>
<span class="ml-1 text-base font-medium text-gray-500 md:ml-2 ">
{current}
</span>
</div>
</li>) : (<></>)}
</ol>
</nav>
</>
);
};