1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import { ReactWrapperComponent , JsxRenderFunc , InputRendererOptions } from '@angular-react/core' ;
5
+ import {
6
+ ChangeDetectionStrategy ,
7
+ ChangeDetectorRef ,
8
+ Component ,
9
+ ElementRef ,
10
+ EventEmitter ,
11
+ Input ,
12
+ Output ,
13
+ Renderer2 ,
14
+ ViewChild ,
15
+ OnInit ,
16
+ } from '@angular/core' ;
17
+ import { ITeachingBubbleProps } from 'office-ui-fabric-react/lib/TeachingBubble' ;
18
+
19
+ @Component ( {
20
+ selector : 'fab-teaching-bubble' ,
21
+ exportAs : 'fabTeachingBubble' ,
22
+ template : `
23
+ <TeachingBubble
24
+ #reactNode
25
+ [ariaDescribedBy]="ariaDescribedBy"
26
+ [ariaLabelledBy]="ariaLabelledBy"
27
+ [calloutProps]="calloutProps"
28
+ [componentRef]="componentRef"
29
+ [footerContent]="footerContent"
30
+ [hasCloseButton]="hasCloseButton"
31
+ [hasCondensedHeadline]="hasCondensedHeadline"
32
+ [hasSmallHeadline]="hasSmallHeadline"
33
+ [headline]="headline"
34
+ [illustrationImage]="illustrationImage"
35
+ [isWide]="isWide"
36
+ (onDismiss)="onDismiss.emit($event)"
37
+ [primaryButtonProps]="primaryButtonProps"
38
+ [secondaryButtonProps]="secondaryButtonProps"
39
+ [styles]="styles"
40
+ [target]="target"
41
+ [theme]="theme"
42
+ >
43
+ <ReactContent><ng-content></ng-content></ReactContent>
44
+ </TeachingBubble>
45
+ ` ,
46
+ styles : [ 'react-renderer' ] ,
47
+ changeDetection : ChangeDetectionStrategy . OnPush ,
48
+ } )
49
+ export class FabTeachingBubbleComponent extends ReactWrapperComponent < ITeachingBubbleProps > {
50
+ @ViewChild ( 'reactNode' , { static : true } ) protected reactNodeRef : ElementRef ;
51
+
52
+ @Input ( ) ariaDescribedBy ?: ITeachingBubbleProps [ 'ariaDescribedBy' ] ;
53
+ @Input ( ) ariaLabelledBy ?: ITeachingBubbleProps [ 'ariaLabelledBy' ] ;
54
+ @Input ( ) calloutProps ?: ITeachingBubbleProps [ 'calloutProps' ] ;
55
+ @Input ( ) componentRef ?: ITeachingBubbleProps [ 'componentRef' ] ;
56
+ @Input ( ) footerContent ?: ITeachingBubbleProps [ 'footerContent' ] ;
57
+ @Input ( ) hasCloseButton ?: ITeachingBubbleProps [ 'hasCloseButton' ] ;
58
+ @Input ( ) hasCondensedHeadline ?: ITeachingBubbleProps [ 'hasCondensedHeadline' ] ;
59
+ @Input ( ) hasSmallHeadline ?: ITeachingBubbleProps [ 'hasSmallHeadline' ] ;
60
+ @Input ( ) headline ?: ITeachingBubbleProps [ 'headline' ] ;
61
+ @Input ( ) illustrationImage ?: ITeachingBubbleProps [ 'illustrationImage' ] ;
62
+ @Input ( ) isWide ?: ITeachingBubbleProps [ 'isWide' ] ;
63
+ @Input ( ) primaryButtonProps ?: ITeachingBubbleProps [ 'primaryButtonProps' ] ;
64
+ @Input ( ) secondaryButtonProps ?: ITeachingBubbleProps [ 'secondaryButtonProps' ] ;
65
+ @Input ( ) styles ?: ITeachingBubbleProps [ 'styles' ] ;
66
+ @Input ( ) target ?: ITeachingBubbleProps [ 'target' ] ;
67
+ @Input ( ) theme ?: ITeachingBubbleProps [ 'theme' ] ;
68
+
69
+ @Output ( ) readonly onDismiss = new EventEmitter < { ev ?: any } > ( ) ;
70
+
71
+ constructor ( elementRef : ElementRef , changeDetectorRef : ChangeDetectorRef , renderer : Renderer2 ) {
72
+ super ( elementRef , changeDetectorRef , renderer ) ;
73
+ }
74
+ }
0 commit comments