22 (arg-or-default @baseClassName " euiButton" )
33 (if
44 @element
5- (element @element )
6- (if
7- (and @href (not (or @isLoading @isDisabled )))
8- (element " a" )
9- (element " button" )
10- )
5+ @element
6+ (if (and @href (not (or @isLoading @isDisabled ))) " a" " button" )
117 )
12- as |baseClassName Element |
8+ as |baseClassName theElement |
139}}
14- <Element
15- class ={{ class-names
16- (if @fill (concat baseClassName " --fill" ))
17- (if @fullWidth (concat baseClassName " --fullWidth" ))
18- (if
19- (or @isLoading @isDisabled @disabled )
20- (concat baseClassName " -isDisabled" )
21- )
22- componentName = (classify baseClassName )
23- color = (arg-or-default @color " primary" )
24- size = @size
25- }}
26- disabled ={{ or @isLoading @isDisabled @disabled }}
27- href ={{ @href }}
28- target ={{ @target }}
29- aria-pressed ={{ if @isSelected " true" null }}
30- ...attributes
31- >
32- <EuiButtonContent
33- class =" euiButton__content {{ @contentClasses }} "
34- @isLoading ={{ @isLoading }}
35- @iconType ={{ @iconType }}
36- @iconSize ={{ @iconSize }}
37- @iconSide ={{ @iconSide }}
38- @iconClasses ={{ @iconClasses }}
39- @useSvg ={{ @useSvg }}
40- @useComponent ={{ @useComponent }}
41- @textClasses ={{ class-names " euiButton__text" @textClasses }}
10+ {{ #let (element theElement ) as |Element |}}
11+ <Element
12+ class ={{ class-names
13+ (if @fill (concat baseClassName " --fill" ))
14+ (if @fullWidth (concat baseClassName " --fullWidth" ))
15+ (if
16+ (or @isLoading @isDisabled @disabled )
17+ (concat baseClassName " -isDisabled" )
18+ )
19+ componentName = (classify baseClassName )
20+ color = (arg-or-default @color " primary" )
21+ size = @size
22+ }}
23+ disabled ={{ or @isLoading @isDisabled @disabled }}
24+ href ={{ @href }}
25+ target ={{ @target }}
26+ aria-pressed ={{ if @isSelected " true" null }}
27+ type ={{ if (eq theElement " button" ) (arg-or-default @type " button" ) null }}
28+ ...attributes
4229 >
43- {{ yield }}
44- </EuiButtonContent >
45- </Element >
30+ <EuiButtonContent
31+ class =" euiButton__content {{ @contentClasses }} "
32+ @isLoading ={{ @isLoading }}
33+ @iconType ={{ @iconType }}
34+ @iconSize ={{ @iconSize }}
35+ @iconSide ={{ @iconSide }}
36+ @iconClasses ={{ @iconClasses }}
37+ @useSvg ={{ @useSvg }}
38+ @useComponent ={{ @useComponent }}
39+ @textClasses ={{ class-names " euiButton__text" @textClasses }}
40+ >
41+ {{ yield }}
42+ </EuiButtonContent >
43+ </Element >
44+ {{ /let }}
4645{{ /let }}
0 commit comments