This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdefault.tsx
More file actions
113 lines (99 loc) · 5.21 KB
/
default.tsx
File metadata and controls
113 lines (99 loc) · 5.21 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { ButtonComponent } from '@syncfusion/ej2-react-buttons';
import { SampleBase } from '../common/sample-base';
import './button.css';
export class Default extends SampleBase<{}, {}> {
public btnobj: ButtonComponent;
//Toggle button click event handler
btnClick(): void {
let proxy: any = this;
if (proxy.btnobj.element.classList.contains('e-active')) {
proxy.btnobj.content = 'Pause';
proxy.btnobj.iconCss = 'e-icons e-pause-icon';
}else {
proxy.btnobj.content = 'Play';
proxy.btnobj.iconCss = 'e-icons e-play-icon';
}
}
render() {
return (
<div className = 'control-pane'>
<div className='control-section'>
<div className='button-section'>
<div id='button-control'>
<div className='row'>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-primary'>Primary</ButtonComponent>
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent>Normal</ButtonComponent>
</div>
</div>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-outline' isPrimary>Outline</ButtonComponent>
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-flat e-primary'>Flat</ButtonComponent>
</div>
</div>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-success'>Success</ButtonComponent>
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-warning'>Warning</ButtonComponent>
</div>
</div>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-danger'>Danger</ButtonComponent>
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-info'>Info</ButtonComponent>
</div>
</div>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-small e-round' iconCss='e-icons e-add-icon' isPrimary></ButtonComponent>
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-flat e-primary' ref={(scope) => { this.btnobj = scope; }} iconCss='e-icons e-play-icon'
isToggle onClick={ this.btnClick.bind(this) }>Play</ButtonComponent>
</div>
</div>
<div className="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-flat e-primary' iconCss='e-icons e-open-icon' iconPosition='Right'>Open</ButtonComponent>
</div>
<div className="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<ButtonComponent cssClass='e-small'>Small</ButtonComponent>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="action-description">
<p>This sample demonstrates the default functionalities of the Button with different types and predefined styles.</p>
</div>
<div id="description">
<p>
Button is a graphical user interface element that triggers an event on click action. It contains the text, an image, or both.
</p>
<p>
In this sample, Play button is a toggle button and it can be enabled by using the <a target="_blank"
href="http://ej2.syncfusion.com/react/documentation/button/api-buttonComponent.html#istoggle-boolean"><code>isToggle
</code></a> property. To change the text and icon you should handle click event.
</p>
<p>
More information about Button can be found in this <a target='_blank'
href='http://ej2.syncfusion.com/react/documentation/button/getting-started.html'>documentation section</a>.
</p>
</div>
</div>
)
}
}