Skip to content

Commit b3f9c3c

Browse files
author
Scott Kurtzeborn
committed
Use Font Awesome icons for action buttons
1 parent 190f05a commit b3f9c3c

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

web/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>k61.dev URL Shortener</title>
77
<meta name="description" content="Fast, free URL shortener with analytics" />
8+
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" />
89
</head>
910
<body>
1011
<div id="root"></div>

web/src/components/Dashboard.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,17 @@ function Dashboard() {
160160
<div className="url-stat">📅 {new Date(url.createdAt).toLocaleDateString()}</div>
161161
<div className="url-actions">
162162
<button
163-
className="btn btn-sm"
163+
className="btn btn-icon"
164164
onClick={() => copyToClipboard(url.shortUrl)}
165165
title="Copy"
166166
>
167-
📋
167+
<i className="fa fa-copy"></i>
168168
</button>
169-
<button className="btn btn-sm" onClick={() => startEdit(url)} title="Edit">
170-
✏️
169+
<button className="btn btn-icon" onClick={() => startEdit(url)} title="Edit">
170+
<i className="fa fa-pencil"></i>
171171
</button>
172-
<button className="btn btn-sm btn-danger" onClick={() => handleDelete(url.id)} title="Delete">
173-
🗑️
172+
<button className="btn btn-icon btn-icon-danger" onClick={() => handleDelete(url.id)} title="Delete">
173+
<i className="fa fa-trash-o"></i>
174174
</button>
175175
</div>
176176
</li>

web/src/index.css

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,23 @@ code {
155155
gap: 5px;
156156
}
157157

158-
.btn-sm {
159-
padding: 5px 8px;
158+
.btn-icon {
159+
padding: 6px 10px;
160160
font-size: 14px;
161-
background: #f0f0f0;
162-
border: 1px solid #ddd;
163-
border-radius: 4px;
161+
background: transparent;
162+
border: none;
163+
color: #666;
164164
cursor: pointer;
165+
border-radius: 4px;
165166
}
166167

167-
.btn-sm:hover {
168-
background: #e0e0e0;
168+
.btn-icon:hover {
169+
background: #f0f0f0;
170+
color: #0066cc;
169171
}
170172

171-
.btn-sm.btn-danger:hover {
173+
.btn-icon-danger:hover {
174+
color: #dc3545;
172175
background: #ffebee;
173176
}
174177

0 commit comments

Comments
 (0)