diff --git a/.storybook/preview.scss b/.storybook/preview.scss
index ff7c3831b9..452e432254 100644
--- a/.storybook/preview.scss
+++ b/.storybook/preview.scss
@@ -46,3 +46,20 @@ pre.prismjs {
.docs-story {
background: var(--bs-body-bg)
}
+
+.btn.pseudo-focus {
+ box-shadow: var(--bs-btn-active-shadow), var(--bs-btn-focus-box-shadow);
+}
+
+.btn.pseudo-hover {
+ color: var(--bs-btn-hover-color);
+ background-color: var(--bs-btn-hover-bg);
+ border-color: var(--bs-btn-hover-border-color);
+}
+
+.btn.pseudo-active {
+ color: var(--bs-btn-active-color);
+ background-color: var(--bs-btn-active-bg);
+ border-color: var(--bs-btn-active-border-color);
+ box-shadow: var(--bs-btn-active-shadow);
+}
diff --git a/src/stories/layout/Button.stories.js b/src/stories/layout/Button.stories.js
index c26d329055..5b95f0f59c 100644
--- a/src/stories/layout/Button.stories.js
+++ b/src/stories/layout/Button.stories.js
@@ -1,4 +1,5 @@
import { BButton, BCloseButton } from 'bootstrap-vue-next'
+import IconButton from '@/components/IconButton'
export default {
title: 'Layout/Button',
@@ -13,90 +14,72 @@ export default {
render: (args) => ({
components: {
BButton,
- BCloseButton
+ IconButton
},
setup() {
return {
args
}
},
+ computed: {
+ variants() {
+ return [
+ 'primary',
+ 'secondary',
+ 'tertiary',
+ 'dark',
+ 'light',
+ 'info',
+ 'danger',
+ 'success',
+ 'warning',
+ 'outline-primary',
+ 'outline-secondary',
+ 'outline-tertiary',
+ 'outline-dark',
+ 'outline-light',
+ 'outline-info',
+ 'outline-danger',
+ 'outline-success',
+ 'outline-warning'
+ ]
+ }
+ },
template: `
-
-
-
- State |
- Base |
- Primary |
- outline-secondary |
- Tertiary |
-
-
-
-
- Default |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- Hover |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- Focus |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- Active |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- Pressed |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- Disabled |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- Loading |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
- BCloseButton |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
- {{args.label}} |
-
-
-
+
+
+
+ Variant |
+ Normal |
+ Hover |
+ Active/Pressed |
+ Focus |
+ Disabled |
+ Loading |
+
+
+
+
+
+
+ --bs-{{ variant }}
+ |
+ {{args.label}} |
+ {{args.label}} |
+ {{args.label}} |
+ {{args.label}} |
+ {{args.label}} |
+ {{args.label}} |
+
+
+
+
`
}),
parameters: {
pseudo: {
- hover: ['#hover'],
- focus: ['.focus'],
- active: ['#active']
+ hover: ['.hover'],
+ focus: ['.focus']
}
}
}