From 88001c44a8e0d002dfe644c8659a5709d4a92d09 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 21 Mar 2022 09:48:49 +0100 Subject: [PATCH] Fix secondary button with old style as temporary solution Signed-off-by: Joas Schilling --- src/components/Button/Button.vue | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/Button/Button.vue b/src/components/Button/Button.vue index 8f32d8b35a..d32c337dd3 100644 --- a/src/components/Button/Button.vue +++ b/src/components/Button/Button.vue @@ -256,12 +256,9 @@ export default { type: { type: String, validator(value) { - // Disallowing secondary until we solve theming and - // accessibility issues. - // https://github.com/nextcloud/nextcloud-vue/issues/2538 - return ['primary', 'tertiary', 'error', 'warning', 'success'].indexOf(value) !== -1 + return ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].indexOf(value) !== -1 }, - default: '', + default: 'secondary', }, /** @@ -516,6 +513,9 @@ export default { &.button-vue--vue-primary { background-color: var(--color-primary-hover); } + &.button-vue--vue-secondary { + box-shadow: 0 0 0 2px var(--color-main-text); + } &.button-vue--vue-tertiary { color: var(--color-main-text); } @@ -546,6 +546,18 @@ export default { } } + // Secondary + &--vue-secondary { + color: var(--color-main-text); + background-color: var(--color-background-dark); + box-shadow: 0 0 0 2px var(--color-border-dark); + &:hover { + color: var(--color-main-text); + background-color: var(--color-background-dark); + box-shadow: 0 0 0 2px var(--color-primary-element); + } + } + // Tertiary &--vue-tertiary { color: var(--color-text-lighter);