Skip to content

Commit

Permalink
Fix secondary button with old style as temporary solution
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Mar 21, 2022
1 parent 44c3ef1 commit 1fcc144
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/components/Button/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ It can be used with one or multiple actions.
:size="20" />
</template>
</Button>
<Button>
<Button
type="secondary">
<template #icon>
<Video
title=""
Expand All @@ -72,7 +73,8 @@ It can be used with one or multiple actions.
type="tertiary">
Example text
</Button>
<Button>
<Button
type="secondary">
Example text
</Button>
<Button
Expand All @@ -95,7 +97,8 @@ It can be used with one or multiple actions.
</template>
Example text
</Button>
<Button>
<Button
type="secondary">
<template #icon>
<Video
title=""
Expand All @@ -116,6 +119,7 @@ It can be used with one or multiple actions.
<!-- Wide button -->
<h5>Wide button</h5>
<Button
type="secondary"
text="Example text"
:wide="true">
<template #icon>
Expand Down Expand Up @@ -256,12 +260,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: '',
required: true,
},
/**
Expand Down Expand Up @@ -516,6 +517,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);
}
Expand Down Expand Up @@ -546,6 +550,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);
Expand Down

0 comments on commit 1fcc144

Please sign in to comment.