Skip to content

Commit

Permalink
fix(b-form-datepicker, b-form-timepicker): fix menu padding in button…
Browse files Browse the repository at this point in the history
… only mode (fixes #5251) (#5252)
  • Loading branch information
tmorehouse authored Apr 26, 2020
1 parent 05446f4 commit d57a643
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
7 changes: 7 additions & 0 deletions src/_custom-controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,10 @@
}
}
}

// Button only mode menu padding overrides
.b-form-btn-label-control.btn-group {
> .dropdown-menu {
padding: 0.5rem;
}
}
2 changes: 1 addition & 1 deletion src/components/form-datepicker/form-datepicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('form-date', () => {
await waitRAF()

expect(wrapper.classes()).toContain('b-form-datepicker')
expect(wrapper.classes()).not.toContain('b-form-btn-label-control')
expect(wrapper.classes()).toContain('b-form-btn-label-control')
expect(wrapper.classes()).not.toContain('form-control')
expect(wrapper.classes()).toContain('dropdown')
expect(wrapper.classes()).not.toContain('show')
Expand Down
2 changes: 1 addition & 1 deletion src/components/form-timepicker/form-timepicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ describe('form-timepicker', () => {
await waitRAF()

expect(wrapper.classes()).toContain('b-form-timepicker')
expect(wrapper.classes()).not.toContain('b-form-btn-label-control')
expect(wrapper.classes()).toContain('b-form-btn-label-control')
expect(wrapper.classes()).not.toContain('form-control')
expect(wrapper.classes()).toContain('dropdown')
expect(wrapper.classes()).not.toContain('show')
Expand Down
3 changes: 1 addition & 2 deletions src/utils/bv-form-btn-label-control.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,11 @@ export const BVFormBtnLabelControl = /*#__PURE__*/ Vue.extend({
return h(
'div',
{
staticClass: 'dropdown',
staticClass: 'b-form-btn-label-control dropdown',
class: [
this.directionClass,
{
'btn-group': buttonOnly,
'b-form-btn-label-control': !buttonOnly,
'form-control': !buttonOnly,
[`form-control-${size}`]: !!size && !buttonOnly,
'd-flex': !buttonOnly,
Expand Down

0 comments on commit d57a643

Please sign in to comment.