Skip to content

Commit d57a643

Browse files
authored
fix(b-form-datepicker, b-form-timepicker): fix menu padding in button only mode (fixes #5251) (#5252)
1 parent 05446f4 commit d57a643

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/_custom-controls.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,10 @@
133133
}
134134
}
135135
}
136+
137+
// Button only mode menu padding overrides
138+
.b-form-btn-label-control.btn-group {
139+
> .dropdown-menu {
140+
padding: 0.5rem;
141+
}
142+
}

src/components/form-datepicker/form-datepicker.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('form-date', () => {
8484
await waitRAF()
8585

8686
expect(wrapper.classes()).toContain('b-form-datepicker')
87-
expect(wrapper.classes()).not.toContain('b-form-btn-label-control')
87+
expect(wrapper.classes()).toContain('b-form-btn-label-control')
8888
expect(wrapper.classes()).not.toContain('form-control')
8989
expect(wrapper.classes()).toContain('dropdown')
9090
expect(wrapper.classes()).not.toContain('show')

src/components/form-timepicker/form-timepicker.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('form-timepicker', () => {
8383
await waitRAF()
8484

8585
expect(wrapper.classes()).toContain('b-form-timepicker')
86-
expect(wrapper.classes()).not.toContain('b-form-btn-label-control')
86+
expect(wrapper.classes()).toContain('b-form-btn-label-control')
8787
expect(wrapper.classes()).not.toContain('form-control')
8888
expect(wrapper.classes()).toContain('dropdown')
8989
expect(wrapper.classes()).not.toContain('show')

src/utils/bv-form-btn-label-control.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,11 @@ export const BVFormBtnLabelControl = /*#__PURE__*/ Vue.extend({
284284
return h(
285285
'div',
286286
{
287-
staticClass: 'dropdown',
287+
staticClass: 'b-form-btn-label-control dropdown',
288288
class: [
289289
this.directionClass,
290290
{
291291
'btn-group': buttonOnly,
292-
'b-form-btn-label-control': !buttonOnly,
293292
'form-control': !buttonOnly,
294293
[`form-control-${size}`]: !!size && !buttonOnly,
295294
'd-flex': !buttonOnly,

0 commit comments

Comments
 (0)