Improve slot detection

pull/481/head
Cory LaViska 2020-12-22 17:08:19 -05:00
rodzic 523aa6cdf6
commit 0aa1c9a741
4 zmienionych plików z 9 dodań i 0 usunięć

Wyświetl plik

@ -27,6 +27,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
- Fixed a bug where disabled link buttons didn't appear disabled
- Improved elevation tokens in dark theme
- Improved accessibility in `sl-tooltip` by allowing escape to dismiss it [#219](https://github.com/shoelace-style/shoelace/issues/219)
- Improved slot detection in `sl-card`, `sl-dialog`, and `sl-drawer`
- Removed `sl-blur` and `sl-focus` events from `sl-menu` since menus can't have focus as of 2.0.0-beta.22
- Updated `sl-spinner` so the indicator is more obvious
- Updated to Bootstrap Icons 1.2.1

Wyświetl plik

@ -33,6 +33,10 @@ export class Card {
this.handleSlotChange = this.handleSlotChange.bind(this);
}
componentWillLoad() {
this.handleSlotChange();
}
handleSlotChange() {
this.hasFooter = hasSlot(this.host, 'footer');
this.hasImage = hasSlot(this.host, 'image');

Wyświetl plik

@ -89,6 +89,8 @@ export class Dialog {
}
componentWillLoad() {
this.handleSlotChange();
// Show on init if open
if (this.open) {
this.show();

Wyświetl plik

@ -97,6 +97,8 @@ export class Drawer {
}
componentWillLoad() {
this.handleSlotChange();
// Show on init if open
if (this.open) {
this.show();