kopia lustrzana https://github.com/shoelace-style/shoelace
Improve slot detection
rodzic
523aa6cdf6
commit
0aa1c9a741
|
@ -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
|
- Fixed a bug where disabled link buttons didn't appear disabled
|
||||||
- Improved elevation tokens in dark theme
|
- 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 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
|
- 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 `sl-spinner` so the indicator is more obvious
|
||||||
- Updated to Bootstrap Icons 1.2.1
|
- Updated to Bootstrap Icons 1.2.1
|
||||||
|
|
|
@ -33,6 +33,10 @@ export class Card {
|
||||||
this.handleSlotChange = this.handleSlotChange.bind(this);
|
this.handleSlotChange = this.handleSlotChange.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillLoad() {
|
||||||
|
this.handleSlotChange();
|
||||||
|
}
|
||||||
|
|
||||||
handleSlotChange() {
|
handleSlotChange() {
|
||||||
this.hasFooter = hasSlot(this.host, 'footer');
|
this.hasFooter = hasSlot(this.host, 'footer');
|
||||||
this.hasImage = hasSlot(this.host, 'image');
|
this.hasImage = hasSlot(this.host, 'image');
|
||||||
|
|
|
@ -89,6 +89,8 @@ export class Dialog {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillLoad() {
|
componentWillLoad() {
|
||||||
|
this.handleSlotChange();
|
||||||
|
|
||||||
// Show on init if open
|
// Show on init if open
|
||||||
if (this.open) {
|
if (this.open) {
|
||||||
this.show();
|
this.show();
|
||||||
|
|
|
@ -97,6 +97,8 @@ export class Drawer {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillLoad() {
|
componentWillLoad() {
|
||||||
|
this.handleSlotChange();
|
||||||
|
|
||||||
// Show on init if open
|
// Show on init if open
|
||||||
if (this.open) {
|
if (this.open) {
|
||||||
this.show();
|
this.show();
|
||||||
|
|
Ładowanie…
Reference in New Issue