-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[dashboard] button styling #3620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,23 +35,34 @@ | |
|
||
@layer components { | ||
button { | ||
@apply cursor-pointer px-4 py-2 my-auto bg-green-600 hover:bg-green-700 border-2 border-green-800 text-gray-100 text-sm font-medium rounded-md focus:outline-none focus:ring focus:border-blue-300; | ||
@apply cursor-pointer px-4 py-2 my-auto bg-green-600 hover:bg-green-700 text-gray-100 text-sm font-medium rounded-md focus:outline-none focus:ring; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: Phew! That was close! Thanks for going back to green here! 😅 |
||
} | ||
button.secondary { | ||
@apply bg-gray-100 hover:bg-gray-200 text-gray-500 hover:text-gray-600; | ||
} | ||
button.danger { | ||
@apply bg-red-600 hover:bg-red-700 text-gray-100; | ||
} | ||
button.danger.secondary { | ||
@apply bg-red-50 hover:bg-red-100 text-red-600 hover:text-red-700; | ||
} | ||
|
||
button:disabled { | ||
@apply cursor-default; | ||
@apply cursor-default opacity-50 pointer-events-none; | ||
} | ||
|
||
input[type=text] { | ||
@apply text-xs block w-56 text-sm text-gray-600 rounded-md border-2 border-gray-400 focus:border-gray-500 focus:bg-white focus:ring-0; | ||
input[type=text], input[type=password], select { | ||
@apply text-xs block w-56 text-sm text-gray-600 rounded-md border border-gray-300 focus:border-gray-400 focus:bg-white focus:ring-0; | ||
} | ||
|
||
input[type=text]::placeholder { | ||
input[type=text]::placeholder, input[type=password]::placeholder { | ||
@apply text-gray-400; | ||
} | ||
|
||
input[disabled] { | ||
@apply bg-gray-100 border-2 border-gray-300 text-gray-400; | ||
@apply bg-gray-100 border border-gray-200 text-gray-400; | ||
} | ||
|
||
input[type=radio] { | ||
@apply rounded-md border border-gray-300 focus:border-gray-400 focus:bg-white focus:ring-0; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,7 +218,7 @@ function GitProviders() { | |
</div> | ||
</div> | ||
<div className="flex justify-end mt-6"> | ||
<button className={"ml-2 border-red-900 bg-red-500 hover:bg-red-700"} onClick={() => disconnect(diconnectModal.provider)}>Disconnect Provider</button> | ||
<button className={"ml-2 danger secondary"} onClick={() => disconnect(diconnectModal.provider)}>Disconnect Provider</button> | ||
</div> | ||
</Modal> | ||
)} | ||
|
@@ -350,7 +350,7 @@ function GitIntegrations() { | |
</div> | ||
</div> | ||
<div className="flex justify-end mt-6"> | ||
<button className={"ml-2 border-red-900 bg-red-500 hover:bg-red-700"} onClick={() => deleteProvider(modal.provider)}>Remove Integration</button> | ||
<button className={"ml-2 danger secondary"} onClick={() => deleteProvider(modal.provider)}>Remove Integration</button> | ||
</div> | ||
</Modal> | ||
)} | ||
|
@@ -567,7 +567,7 @@ function GitIntegrationModal(props: ({ | |
{props.mode === "new" && ( | ||
<div className="flex flex-col space-y-2"> | ||
<label htmlFor="type" className="font-medium">Provider Type</label> | ||
<select name="type" value={type} disabled={props.mode !== "new"} className="rounded-md w-full border-2 border-gray-400" | ||
<select name="type" value={type} disabled={props.mode !== "new"} className="w-full" | ||
onChange={(e) => setType(e.target.value)}> | ||
<option value="GitHub">GitHub</option> | ||
<option value="GitLab">GitLab</option> | ||
|
@@ -576,13 +576,13 @@ function GitIntegrationModal(props: ({ | |
)} | ||
<div className="flex flex-col space-y-2"> | ||
<label htmlFor="hostName" className="font-medium">Provider Host Name</label> | ||
<input name="hostName" disabled={props.mode === "edit"} type="text" value={host} className="rounded-md w-full border-2 border-gray-400" | ||
<input name="hostName" disabled={props.mode === "edit"} type="text" value={host} className="w-full" | ||
onChange={(e) => updateHostValue(e.target.value)} /> | ||
</div> | ||
<div className="flex flex-col space-y-2"> | ||
<label htmlFor="redirectURL" className="font-medium">Redirect URL</label> | ||
<div className="w-full relative"> | ||
<input name="redirectURL" disabled={true} readOnly={true} type="text" value={redirectURL} className="rounded-md w-full truncate pr-8" /> | ||
<input name="redirectURL" disabled={true} readOnly={true} type="text" value={redirectURL} className="w-full truncate" /> | ||
<div className="cursor-pointer" onClick={() => copyRedirectUrl()}> | ||
<img src={copy} title="Copy the Redirect URL to clippboard." className="absolute top-1/3 right-3" /> | ||
</div> | ||
|
@@ -591,12 +591,12 @@ function GitIntegrationModal(props: ({ | |
</div> | ||
<div className="flex flex-col space-y-2"> | ||
<label htmlFor="clientId" className="font-medium">Client ID</label> | ||
<input name="clientId" type="text" value={clientId} className="rounded-md w-full border-2 border-gray-400" | ||
<input name="clientId" type="text" value={clientId} className="w-full" | ||
onChange={(e) => updateClientId(e.target.value)} /> | ||
</div> | ||
<div className="flex flex-col space-y-2"> | ||
<label htmlFor="clientSecret" className="font-medium">Client Secret</label> | ||
<input name="clientSecret" type="password" value={clientSecret} className="rounded-md w-full border-2 border-gray-400" | ||
<input name="clientSecret" type="password" value={clientSecret} className="w-full" | ||
onChange={(e) => updateClientSecret(e.target.value)} /> | ||
</div> | ||
{errorMessage && ( | ||
|
@@ -613,7 +613,7 @@ function GitIntegrationModal(props: ({ | |
)} | ||
</div> | ||
<div className="flex justify-end mt-6"> | ||
<button className="disabled:opacity-50" onClick={() => validate() && activate()} disabled={!!validationError || busy}>Activate Integration</button> | ||
<button onClick={() => validate() && activate()} disabled={!!validationError || busy}>Activate Integration</button> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: Could we also remove the hover state when this is disabled? Same for updating git permissions. |
||
</div> | ||
</Modal>); | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: We're going to need the
border-2
for secondary buttons, see delete button in Account. ❗