Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(b-form-datepicker/b-form-timepicker): label styles when in `butto…
…n-only` mode (closes #6172) (#6186)

* fix(b-form-datepicker/b-form-timepicker): label styles when in `button-only` mode

* Update bv-form-btn-label-control.js

* Update bv-form-btn-label-control.js
  • Loading branch information
jacobmllr95 committed Dec 14, 2020
1 parent fab6dc5 commit e8842ba
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 216 deletions.
23 changes: 12 additions & 11 deletions src/components/form-btn-label-control/bv-form-btn-label-control.js
Expand Up @@ -208,17 +208,18 @@ export const BVFormBtnLabelControl = /*#__PURE__*/ Vue.extend({
const $label = h(
'label',
{
staticClass: 'form-control text-break text-wrap bg-transparent h-auto',
class: [
{
// Hidden in button only mode
'sr-only': buttonOnly,
// Mute the text if showing the placeholder
'text-muted': !value
},
this.stateClass,
this.sizeFormClass
],
class: buttonOnly
? 'sr-only' // Hidden in button only mode
: [
'form-control',
'text-break',
'text-wrap',
'bg-transparent',
// Mute the text if showing the placeholder
{ 'text-muted': !value },
this.stateClass,
this.sizeFormClass
],
attrs: {
id: idLabel,
for: idButton,
Expand Down
3 changes: 0 additions & 3 deletions src/components/form-datepicker/form-datepicker.js
Expand Up @@ -53,9 +53,6 @@ export const props = makePropsConfigurable(
...modelProps,
...calendarProps,
...formBtnLabelControlProps,
buttonOnly: makeProp(PROP_TYPE_BOOLEAN, false),
// Applicable in button only mode
buttonVariant: makeProp(PROP_TYPE_STRING, 'secondary'),
// Width of the calendar dropdown
calendarWidth: makeProp(PROP_TYPE_STRING, '270px'),
closeButton: makeProp(PROP_TYPE_BOOLEAN, false),
Expand Down

0 comments on commit e8842ba

Please sign in to comment.