Skip to content

Commit 13c9110

Browse files
committed
feat: building a paignation component
1 parent 2582247 commit 13c9110

File tree

2 files changed

+97
-1
lines changed

2 files changed

+97
-1
lines changed

starter/06-Components/Table/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,48 @@
5151
</tr>
5252
</tbody>
5353
</table>
54+
55+
<div class="pagination">
56+
<button class="btn btn-previous">
57+
<svg
58+
xmlns="http://www.w3.org/2000/svg"
59+
fill="none"
60+
viewBox="0 0 24 24"
61+
stroke-width="1.5"
62+
stroke="currentColor"
63+
class="btn-icon"
64+
>
65+
<path
66+
stroke-linecap="round"
67+
stroke-linejoin="round"
68+
d="M15.75 19.5L8.25 12l7.5-7.5"
69+
/>
70+
</svg>
71+
</button>
72+
<button class="btn">1</button>
73+
<button class="btn">2</button>
74+
<button class="btn btn-active">3</button>
75+
<button class="btn">4</button>
76+
<button class="btn">5</button>
77+
<button class="btn">6</button>
78+
<span class="dots">...</span>
79+
<button class="btn">23</button>
80+
<button class="btn btn-next">
81+
<svg
82+
xmlns="http://www.w3.org/2000/svg"
83+
fill="none"
84+
viewBox="0 0 24 24"
85+
stroke-width="1.5"
86+
stroke="currentColor"
87+
class="btn-icon"
88+
>
89+
<path
90+
stroke-linecap="round"
91+
stroke-linejoin="round"
92+
d="M8.25 4.5l7.5 7.5-7.5 7.5"
93+
/>
94+
</svg>
95+
</button>
96+
</div>
5497
</body>
5598
</html>

starter/06-Components/Table/style.css

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ body {
2828

2929
table {
3030
width: 800px;
31-
margin: 100px auto;
31+
margin: 0 auto;
32+
margin-top: 100px;
3233
border-collapse: collapse;
3334
font-size: 18px;
3435
}
@@ -56,3 +57,55 @@ tbody tr:nth-child(odd) {
5657
tbody tr:nth-child(even) {
5758
background-color: #e9ecef;
5859
}
60+
61+
/* PAGINATION STYLES */
62+
.pagination {
63+
display: flex;
64+
align-items: center;
65+
justify-content: center;
66+
gap: 12px;
67+
margin-top: 16px;
68+
}
69+
70+
.btn {
71+
width: 32px;
72+
height: 32px;
73+
border: none;
74+
border-radius: 50%;
75+
background: none;
76+
color: #343a40;
77+
font-weight: 500;
78+
font-size: 16px;
79+
display: flex;
80+
align-items: center;
81+
justify-content: center;
82+
cursor: pointer;
83+
}
84+
85+
.btn-previous,
86+
.btn-next {
87+
color: #087f5b;
88+
border: 1px solid #087f5b;
89+
width: 48px;
90+
height: 48px;
91+
}
92+
93+
.btn-icon {
94+
width: 24px;
95+
height: 24px;
96+
stroke: currentColor;
97+
}
98+
99+
.btn-active {
100+
cursor: default;
101+
}
102+
103+
.btn-active,
104+
.btn:hover {
105+
background-color: #087f5b;
106+
color: #fff;
107+
}
108+
109+
.dots {
110+
color: #868e96;
111+
}

0 commit comments

Comments
 (0)