mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/css: add shared class for primary color buttons
This commit is contained in:
parent
9e795ed3bd
commit
4ee46c8df5
5 changed files with 15 additions and 25 deletions
|
@ -174,6 +174,15 @@ button, a.button, span.button {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.primary-color-button:not(:disabled) {
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
color: var(--inverted-text-color);
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
background-color: var(--primary-color-dark);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
|
|
@ -55,13 +55,7 @@ main.matrix-login {
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background-color: var(--primary-color);
|
|
||||||
color: var(--inverted-text-color);
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
&:hover, &:focus {
|
|
||||||
background-color: var(--primary-color-dark);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div.error {
|
div.error {
|
||||||
|
|
|
@ -148,12 +148,12 @@ export const LoginScreen = ({ client }: LoginScreenProps) => {
|
||||||
/>}
|
/>}
|
||||||
<div className="buttons">
|
<div className="buttons">
|
||||||
{supportsSSO && <button
|
{supportsSSO && <button
|
||||||
className="mx-login-button"
|
className="mx-login-button primary-color-button"
|
||||||
type={supportsPassword ? "button" : "submit"}
|
type={supportsPassword ? "button" : "submit"}
|
||||||
onClick={supportsPassword ? loginSSO : undefined}
|
onClick={supportsPassword ? loginSSO : undefined}
|
||||||
>Login with SSO</button>}
|
>Login with SSO</button>}
|
||||||
{supportsPassword && <button
|
{supportsPassword && <button
|
||||||
className="mx-login-button"
|
className="mx-login-button primary-color-button"
|
||||||
type="submit"
|
type="submit"
|
||||||
>Login{supportsSSO || beeperDomain ? " with password" : ""}</button>}
|
>Login{supportsSSO || beeperDomain ? " with password" : ""}</button>}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,26 +48,13 @@ div.settings-view {
|
||||||
|
|
||||||
> button {
|
> button {
|
||||||
padding: .5rem 1rem;
|
padding: .5rem 1rem;
|
||||||
|
|
||||||
&.save {
|
|
||||||
background-color: var(--primary-color);
|
|
||||||
color: var(--inverted-text-color);
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
&:hover, &:focus {
|
&.delete:hover, &.delete:focus {
|
||||||
background-color: var(--primary-color-dark);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.delete {
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
&:hover, &:focus {
|
|
||||||
background-color: var(--error-color);
|
background-color: var(--error-color);
|
||||||
color: var(--inverted-text-color);
|
color: var(--inverted-text-color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@ const CustomCSSInput = ({ setPref, room }: { setPref: SetPrefFunc, room: RoomSta
|
||||||
<textarea value={text} onChange={onChangeText}/>
|
<textarea value={text} onChange={onChangeText}/>
|
||||||
<div className="buttons">
|
<div className="buttons">
|
||||||
<button className="delete" onClick={onDelete}>Delete</button>
|
<button className="delete" onClick={onDelete}>Delete</button>
|
||||||
<button className="save" onClick={onSave}>Save</button>
|
<button className="save primary-color-button" onClick={onSave}>Save</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue