File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/bootstrap-vue-3/src/components/BButton Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 6
6
7
7
<script setup lang="ts">
8
8
// import type {BButtonGroupProps} from '../../types/components'
9
+ import type {Booleanish } from ' ../../types'
9
10
import {computed } from ' vue'
11
+ import {resolveBooleanish } from ' ../../utils'
10
12
11
13
interface BButtonGroupProps {
12
14
ariaRole? : string
13
15
size? : string
14
16
tag? : string
15
- vertical? : boolean
17
+ vertical? : Booleanish
16
18
}
17
19
18
20
const props = withDefaults (defineProps <BButtonGroupProps >(), {
@@ -21,9 +23,11 @@ const props = withDefaults(defineProps<BButtonGroupProps>(), {
21
23
vertical: false ,
22
24
})
23
25
26
+ const verticalBoolean = computed <boolean >(() => resolveBooleanish (props .vertical ))
27
+
24
28
const classes = computed (() => ({
25
- ' btn-group' : ! props . vertical ,
26
- ' btn-group-vertical' : props . vertical ,
29
+ ' btn-group' : ! verticalBoolean . value ,
30
+ ' btn-group-vertical' : verticalBoolean . value ,
27
31
[` btn-group-${props .size } ` ]: props .size ,
28
32
}))
29
33
</script >
You can’t perform that action at this time.
0 commit comments