Skip to content

Commit 2f988c9

Browse files
trumbittaroboquat
authored andcommitted
[dashboard] add button.gp-link CSS class
To be used for anchor tags that should've been buttons because they don't really bring the user to any new location.
1 parent 7ca8c86 commit 2f988c9

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

components/dashboard/src/index.css

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
@tailwind utilities;
1010

1111
@layer base {
12-
html, body {
12+
html,
13+
body {
1314
@apply h-full;
1415
}
1516
body {
@@ -61,30 +62,42 @@
6162
@apply cursor-default opacity-50 pointer-events-none;
6263
}
6364

64-
a.gp-link {
65-
@apply text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-500;
65+
button.gp-link {
66+
@apply bg-transparent hover:bg-transparent p-0 rounded-none;
67+
}
68+
69+
a.gp-link,
70+
button.gp-link {
71+
@apply text-blue-500 hover:text-blue-600 dark:text-blue-400 dark:hover:text-blue-500;
6672
}
6773

68-
input[type=text], input[type=search], input[type=password], select {
74+
input[type="text"],
75+
input[type="search"],
76+
input[type="password"],
77+
select {
6978
@apply block w-56 text-gray-600 dark:text-gray-400 bg-white dark:bg-gray-800 rounded-md border border-gray-300 dark:border-gray-500 focus:border-gray-400 dark:focus:border-gray-400 focus:ring-0;
7079
}
71-
input[type=text]::placeholder, input[type=search]::placeholder, input[type=password]::placeholder {
80+
input[type="text"]::placeholder,
81+
input[type="search"]::placeholder,
82+
input[type="password"]::placeholder {
7283
@apply text-gray-400 dark:text-gray-500;
7384
}
74-
input[type=text].error, input[type=password].error, select.error {
85+
input[type="text"].error,
86+
input[type="password"].error,
87+
select.error {
7588
@apply border-gitpod-red dark:border-gitpod-red focus:border-gitpod-red dark:focus:border-gitpod-red;
7689
}
7790
input[disabled] {
7891
@apply bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 text-gray-400 dark:text-gray-500;
7992
}
80-
input[type=radio] {
93+
input[type="radio"] {
8194
@apply border border-gray-300 focus:border-gray-400 focus:bg-white focus:ring-0;
8295
}
83-
input[type=search] {
96+
input[type="search"] {
8497
@apply border-0 dark:bg-transparent;
8598
}
86-
input[type=checkbox] {
87-
@apply disabled:opacity-50
99+
input[type="checkbox"] {
100+
@apply disabled:opacity-50;
88101
}
89102

90103
progress {
@@ -99,4 +112,4 @@
99112
progress::-moz-progress-bar {
100113
@apply rounded-md bg-green-500;
101114
}
102-
}
115+
}

components/dashboard/src/projects/NewProject.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,9 +368,9 @@ export default function NewProject() {
368368
<p className="text-gray-500 text-center text-base mt-12">
369369
{loaded && noReposAvailable ? "Select account on " : "Select a Git repository on "}
370370
<b>{selectedProviderHost}</b> (
371-
<a className="gp-link cursor-pointer" onClick={() => setShowGitProviders(true)}>
371+
<button className="gp-link cursor-pointer" onClick={() => setShowGitProviders(true)}>
372372
change
373-
</a>
373+
</button>
374374
)
375375
</p>
376376
<div className={`mt-2 flex-col ${noReposAvailable && isGitHub() ? "w-96" : ""}`}>
@@ -493,13 +493,12 @@ export default function NewProject() {
493493
<div>
494494
<div className="text-gray-500 text-center w-96 mx-8">
495495
Repository not found?{" "}
496-
<a
497-
href="javascript:void(0)"
496+
<button
498497
onClick={(e) => reconfigure()}
499-
className="text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600"
498+
className="gp-link text-gray-400 underline underline-thickness-thin underline-offset-small hover:text-gray-600"
500499
>
501500
Reconfigure
502-
</a>
501+
</button>
503502
</div>
504503
</div>
505504
)}

0 commit comments

Comments
 (0)