forked from syncfusion/ej2-react-ui-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqrcodegenerator.component.tsx
47 lines (41 loc) · 1.68 KB
/
qrcodegenerator.component.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import * as React from 'react';
import { QRCodeGenerator, QRCodeGeneratorModel } from '@syncfusion/ej2-barcode-generator';
import { ComponentBase, applyMixins, DefaultHtmlAttributes } from '@syncfusion/ej2-react-base';
/**
* Represents react QRCode Component
* ```tsx
* <QRCodeGeneratorComponent></QRCodeGeneratorComponent>
* ```
*/
export class QRCodeGeneratorComponent extends QRCodeGenerator {
public state: Readonly<{ children?: React.ReactNode | React.ReactNode[] }>
& Readonly<QRCodeGeneratorModel & DefaultHtmlAttributes>;
public setState: any;
private getDefaultAttributes: Function;
public initRenderCalled: boolean = false;
private checkInjectedModules: boolean = true;
private statelessTemplateProps: string[] = null;
private templateProps: string[] = null;
private immediateRender: boolean = true;
public props: Readonly<{ children?: React.ReactNode | React.ReactNode[] }>
& Readonly<QRCodeGeneratorModel & DefaultHtmlAttributes>;
public forceUpdate: (callBack?: () => any) => void;
public context: Object;
public portals: any = [];
public isReactComponent: Object;
public refs: {
[key: string]: React.ReactInstance
};
constructor(props: any) {
super(props);
}
public render(): any {
if (((this.element && !this.initRenderCalled) || this.refreshing) && !(this as any).isReactForeceUpdate) {
super.render();
this.initRenderCalled = true;
} else {
return React.createElement('div', this.getDefaultAttributes(),[].concat(this.props.children,this.portals));
}
}
}
applyMixins(QRCodeGeneratorComponent, [ComponentBase, React.Component]);