fix(input-datepicker): refactor unnamed slot to named content slot

unnamed slot is now removed, you have to use named slot="content" in order to pass content to the calendar overlay frame
This commit is contained in:
Joren Broekema 2020-02-20 11:49:49 +01:00 committed by Thomas Allmer
parent ae30a30bc2
commit f810a30103
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
import { html, css, LitElement } from '@lion/core';
import { css, html, LitElement } from '@lion/core';
import { LocalizeMixin } from '@lion/localize';
export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
@ -111,7 +111,7 @@ export class LionCalendarOverlayFrame extends LocalizeMixin(LitElement) {
<slot name="close-icon">&times;</slot>
</button>
</div>
<slot></slot>
<slot name="content"></slot>
</div>
`;
}

View file

@ -1,8 +1,7 @@
import '@lion/calendar/lion-calendar.js';
import { html, ifDefined, render } from '@lion/core';
import { LionInputDate } from '@lion/input-date';
import { withModalDialogConfig, OverlayMixin } from '@lion/overlays';
import '@lion/calendar/lion-calendar.js';
import { OverlayMixin, withModalDialogConfig } from '@lion/overlays';
import './lion-calendar-overlay-frame.js';
/**
@ -230,6 +229,7 @@ export class LionInputDatepicker extends OverlayMixin(LionInputDate) {
_calendarTemplate() {
return html`
<lion-calendar
slot="content"
id="calendar"
.selectedDate="${this.constructor.__getSyncDownValue(this.modelValue)}"
.minDate="${this.__calendarMinDate}"