-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add a button style for being used on primary like in the header #2871
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 |
---|---|---|
|
@@ -238,13 +238,13 @@ export default { | |
|
||
/** | ||
* Specifies the button type | ||
* Accepted values: primary, secondary, tertiary, error, warning, success. If left empty, | ||
* Accepted values: primary, secondary, tertiary, tertiary-no-background, tertiary-on-primary, error, warning, success. If left empty, | ||
* the default button style will be applied. | ||
*/ | ||
type: { | ||
type: String, | ||
validator(value) { | ||
return ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'error', 'warning', 'success'].indexOf(value) !== -1 | ||
return ['primary', 'secondary', 'tertiary', 'tertiary-no-background', 'tertiary-on-primary', 'error', 'warning', 'success'].indexOf(value) !== -1 | ||
}, | ||
default: 'secondary', | ||
}, | ||
|
@@ -535,6 +535,11 @@ export default { | |
&.button-vue--vue-tertiary-no-background { | ||
opacity: 1; | ||
} | ||
&.button-vue--vue-tertiary-on-primary { | ||
border-radius: var(--border-radius); | ||
opacity: 1; | ||
background-color: transparent; | ||
} | ||
&.button-vue--vue-success { | ||
background-color: var(--color-success-hover); | ||
} | ||
|
@@ -595,6 +600,18 @@ export default { | |
} | ||
} | ||
|
||
// Tertiary on primary color (like the header) | ||
&--vue-tertiary-on-primary { | ||
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. Should we just call it "inverted colours" or something like that? I can imagine we could use something similar in talk's call view 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. No that's not how it works. In Talk we would always need white or something alike, not depening on the primary color nor the background. |
||
color: var(--color-primary-text); | ||
background-color: transparent; | ||
opacity: .7; | ||
|
||
&:hover:not(:disabled) { | ||
background-color: transparent; | ||
opacity: 1; | ||
} | ||
} | ||
|
||
// Success | ||
&--vue-success { | ||
background-color: var(--color-success); | ||
|
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.
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.
Could we do this via a separate prop
square
? I'm using this for the input too. Sometimes it's neededThere 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.
This is what all the icons in the top bar use:
https://github.com/nextcloud/server/blob/87320cba99229e065747d699461b1dddc54326f8/core/css/header.scss#L24-L28
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.
Yes but we need this kind of buttons elsewhere too
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.
I think the square (if we introduce it) should work on all buttons, so I would like to have that done in a seperate PR
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.
Reported at #2873