File tree Expand file tree Collapse file tree 9 files changed +21
-10
lines changed
packages/core/addon/components
eui-markdown-editor-toolbar Expand file tree Collapse file tree 9 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1313 @type ={{ @iconType }}
1414 @size =" m"
1515 @useSvg ={{ @useSvg }}
16+ @useComponent ={{ @useComponent }}
1617 />
1718 {{ /if }}
1819 <span class ={{ @textClasses }} >
Original file line number Diff line number Diff line change 1818 @iconSide ={{ @iconSide }}
1919 @iconClasses ={{ @iconClasses }}
2020 @useSvg ={{ @useSvg }}
21+ @useComponent ={{ @useComponent }}
2122 @textClasses ={{ class-names " euiButtonEmpty__text" @textClasses }}
2223 >
2324 {{ yield }}
4445 @iconSide ={{ @iconSide }}
4546 @iconClasses ={{ @iconClasses }}
4647 @useSvg ={{ @useSvg }}
48+ @useComponent ={{ @useComponent }}
4749 @textClasses ={{ class-names " euiButtonEmpty__text" @textClasses }}
4850 >
4951 {{ yield }}
Original file line number Diff line number Diff line change 1111 @type ={{ @iconType }}
1212 @size ={{ arg-or-default @iconSize " m" }}
1313 @useSvg ={{ @useSvg }}
14+ @useComponent ={{ @useComponent }}
1415 aria-hidden =" true"
1516 />
1617 {{ /if }}
2930 @type ={{ @iconType }}
3031 @size ={{ @iconSize }}
3132 @useSvg ={{ @useSvg }}
33+ @useComponent ={{ @useComponent }}
3234 aria-hidden =" true"
3335 />
3436 {{ /if }}
Original file line number Diff line number Diff line change 2121 @iconSide ={{ @iconSide }}
2222 @iconClasses ={{ @iconClasses }}
2323 @useSvg ={{ @useSvg }}
24+ @useComponent ={{ @useComponent }}
2425 @textClasses ={{ class-names " euiButton__text" @textClasses }}
2526 >
2627 {{ yield }}
4849 @iconSide ={{ @iconSide }}
4950 @iconClasses ={{ @iconClasses }}
5051 @useSvg ={{ @useSvg }}
52+ @useComponent ={{ @useComponent }}
5153 @textClasses ={{ class-names " euiButton__text" @textClasses }}
5254 >
5355 {{ yield }}
Original file line number Diff line number Diff line change 1- {{ #if this.icon.moduleName }}
1+ {{ #if @useComponent }}
22 {{! has the shape of a curried component }}
33 {{ #let (component this.icon ) as |IconComponent |}}
44 {{!template-lint-disable}}
Original file line number Diff line number Diff line change 55 {{! pending implementation}}
66 <EuiButtonIcon
77 @iconType ={{ component " eui-loading-spinner" }}
8+ @useComponent ={{ true }}
89 {{! aria-label={ariaLabels.uploadingFiles} }}
910 />
1011 {{ /if }}
2930 </div >
3031 <EuiButtonIcon
3132 class =" euiMarkdownEditorFooter__help"
32- @iconType ={{ this.markdownLogo }}
33+ @iconType ={{ component " eui-markdown-editor-footer/icons/markdown-logo" }}
34+ @useComponent ={{ true }}
3335 @color =" text"
3436 @useSvg ={{ true }}
3537 {{! aria-label={ariaLabels.showMarkdownHelp} }}
Original file line number Diff line number Diff line change 11import Component from '@glimmer/component' ;
22import { tracked } from '@glimmer/tracking' ;
3- import MarkdownLogoComponent from './icons/markdown-logo' ;
43
54export interface EuiMarkdownEditorFooterArgs { }
65
76export default class EuiMarkdownEditorFooterComponent extends Component < EuiMarkdownEditorFooterArgs > {
87 @tracked isPopoverOpen = false ;
98 @tracked isShowingHelp = false ;
10-
11- get markdownLogo ( ) {
12- return MarkdownLogoComponent ;
13- }
149}
Original file line number Diff line number Diff line change 1818 <EuiButtonIcon
1919 @color =" text"
2020 {{ on " click" (fn this.handleMdButtonClick item.id )}}
21- @iconType ={{ item.iconType }}
21+ @iconType ={{ if
22+ item.iconType.component
23+ (component item.iconType.component )
24+ item.iconType
25+ }}
26+ @useComponent ={{ item.iconType.component }}
2227 aria-label ={{ item.label }}
2328 @useSvg ={{ item.useSvg }}
2429 @isDisabled ={{ this.isPreviewing }}
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import { action } from '@ember/object';
33import type MarkdownActions from '../../utils/markdown/markdown-actions' ;
44import { MODE_VIEWING } from '../../utils/markdown/markdown-modes' ;
55import { cached } from '@glimmer/tracking' ;
6- import MarkdownCheckmarkComponent from './icons/markdown-checkmark' ;
76
87import { Plugin } from 'unified' ;
98
@@ -50,7 +49,10 @@ export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMark
5049 label : 'Task list' ,
5150 name : 'tl' ,
5251 useSvg : true ,
53- iconType : MarkdownCheckmarkComponent
52+ iconType : {
53+ // this should't be needed when we drop support for 3.24.0
54+ component : 'eui-markdown-editor-toolbar/icons/markdown-checkmark'
55+ }
5456 }
5557 ] ;
5658 }
You can’t perform that action at this time.
0 commit comments