kopia lustrzana https://github.com/shoelace-style/shoelace
fix event type parsing
rodzic
7b907bc326
commit
d5af772444
|
@ -10,6 +10,7 @@ _During the beta period, these restrictions may be relaxed in the event of a mis
|
|||
|
||||
- Add touch support to `sl-rating` [#362](https://github.com/shoelace-style/shoelace/pull/362)
|
||||
- Fixed a bug where the `open` attribute on `sl-details` would prevent it from opening [#357](https://github.com/shoelace-style/shoelace/issues/357)
|
||||
- Fixed event detail type parsing so component class names are shown instead of `default`
|
||||
|
||||
## 2.0.0-beta.30
|
||||
|
||||
|
|
|
@ -152,6 +152,17 @@ components.map(async component => {
|
|||
'{ ' +
|
||||
param.declaration.children
|
||||
.map(child => {
|
||||
// Component exports aren't named, so they appear as "default" in the type data. However, we can use the
|
||||
// id to link them to the right class.
|
||||
if (child.type.name === 'default') {
|
||||
const component = components.find(component => component.id === child.type.id);
|
||||
if (component) {
|
||||
child.type.name = component.name;
|
||||
} else {
|
||||
child.type.name = 'unknown';
|
||||
}
|
||||
}
|
||||
|
||||
if (child.type.type === 'intrinsic' || child.type.type === 'reference') {
|
||||
return `${child.name}: ${child.type.name}`;
|
||||
} else if (child.name) {
|
||||
|
|
Ładowanie…
Reference in New Issue