Commit 5780b3d 1 parent 56069b1 commit 5780b3d Copy full SHA for 5780b3d
File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { tracked } from '@glimmer/tracking';
5
5
import { modifier } from ' ember-modifier' ;
6
6
import AuButton from ' ./au-button' ;
7
7
import AuContent from ' ./au-content' ;
8
- import AuIcon from ' ./au-icon' ;
8
+ import AuIcon , { type AuIconSignature } from ' ./au-icon' ;
9
9
import AuLoader from ' ./au-loader' ;
10
10
import AuToolbar from ' ./au-toolbar' ;
11
11
@@ -16,8 +16,8 @@ const autofocus = modifier(function autofocus(element: HTMLElement) {
16
16
export interface AuAccordionSignature {
17
17
Args: {
18
18
buttonLabel? : string ;
19
- iconClosed? : string ;
20
- iconOpen? : string ;
19
+ iconClosed? : AuIconSignature [ ' Args ' ][ ' icon ' ] ;
20
+ iconOpen? : AuIconSignature [ ' Args ' ][ ' icon ' ] ;
21
21
isOpenInitially? : boolean ;
22
22
loading? : boolean ;
23
23
reverse? : boolean ;
Original file line number Diff line number Diff line change @@ -7,10 +7,10 @@ export interface AuIconSignature {
7
7
alignment? : ' left' | ' right' ;
8
8
// TODO: We should deprecate the non-boolean versions since there is no reason to support them
9
9
ariaHidden? : boolean | ' true' | ' false' ;
10
- icon: string | ComponentLike <Record < string , never > >;
10
+ icon: string | ComponentLike <{ Element : Element } >;
11
11
size? : ' large' ;
12
12
};
13
- Element: SVGSVGElement ;
13
+ Element: Element ;
14
14
}
15
15
16
16
export default class AuIcon extends Component <AuIconSignature > {
@@ -47,10 +47,10 @@ export default class AuIcon extends Component<AuIconSignature> {
47
47
<template >
48
48
{{#if this . iconComponent }}
49
49
{{#let this . iconComponent as | Icon | }}
50
- {{! @glint-expect-error: glint doesn't like us setting attributes on the passed component }}
51
50
<Icon
52
51
class =" au-c-icon {{this .alignment }} {{this .size }} "
53
52
aria-hidden ={{this .ariaHidden }}
53
+ ...attributes
54
54
/>
55
55
{{/let }}
56
56
{{else }}
Original file line number Diff line number Diff line change 1
1
import Component from ' @glimmer/component' ;
2
- import AuIcon from ' ./au-icon' ;
2
+ import AuIcon , { type AuIconSignature } from ' ./au-icon' ;
3
3
4
4
const SKIN_CLASSES = {
5
5
primary: ' au-c-link' ,
@@ -12,7 +12,7 @@ const SKIN_CLASSES = {
12
12
export interface AuLinkExternalSignature {
13
13
Args: {
14
14
hideText? : boolean ;
15
- icon? : string ;
15
+ icon? : AuIconSignature [ ' Args ' ][ ' icon ' ] ;
16
16
iconAlignment? : ' left' | ' right' ;
17
17
skin? :
18
18
| ' primary'
You can’t perform that action at this time.
0 commit comments