forked from syncfusion/blazor-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgressButton.razor
175 lines (155 loc) · 9.72 KB
/
ProgressButton.razor
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
@page "/Buttons/ProgressButton"
@using Syncfusion.EJ2.Blazor.SplitButtons
@inherits SampleBaseComponent;
<div class="control-section">
<div class="progress-button-section">
<div id="progress-button-control">
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Spin Left" IsPrimary="true"></EjsProgressButton>
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Spin Right" IsPrimary="true">
<ProgressButtonSpinSettings Position="SpinPosition.Right"></ProgressButtonSpinSettings>
</EjsProgressButton>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Spin Top" IsPrimary="true">
<ProgressButtonSpinSettings Position="SpinPosition.Top"></ProgressButtonSpinSettings>
</EjsProgressButton>
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Spin Bottom" IsPrimary="true">
<ProgressButtonSpinSettings Position="SpinPosition.Bottom"></ProgressButtonSpinSettings>
</EjsProgressButton>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton CssClass="e-round e-small e-success" IconCss="e-btn-sb-icons e-play-icon">
<ProgressButtonSpinSettings Position="SpinPosition.Center"></ProgressButtonSpinSettings>
<ProgressButtonAnimationSettings Effect="AnimationEffect.ZoomOut"></ProgressButtonAnimationSettings>
</EjsProgressButton>
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton ID="contract" Content="Contract" EnableProgress="true" CssClass="@CssClass">
<ProgressButtonEvents OnBegin="ContractBegin" OnEnd="ContractEnd"></ProgressButtonEvents>
</EjsProgressButton>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Slide Left" EnableProgress="true" CssClass="e-flat e-success">
<ProgressButtonSpinSettings Position="SpinPosition.Center"></ProgressButtonSpinSettings>
<ProgressButtonAnimationSettings Effect="AnimationEffect.SlideLeft"></ProgressButtonAnimationSettings>
</EjsProgressButton>
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Slide Right" EnableProgress="true" CssClass="e-outline e-success">
<ProgressButtonSpinSettings Position="SpinPosition.Center"></ProgressButtonSpinSettings>
<ProgressButtonAnimationSettings Effect="AnimationEffect.SlideRight"></ProgressButtonAnimationSettings>
</EjsProgressButton>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Zoom In" EnableProgress="true" CssClass="e-round-corner e-danger">
<ProgressButtonSpinSettings Position="SpinPosition.Center"></ProgressButtonSpinSettings>
<ProgressButtonAnimationSettings Effect="AnimationEffect.ZoomIn"></ProgressButtonAnimationSettings>
</EjsProgressButton>
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton ID="roundbtn" Content="Zoom Out" EnableProgress="true" CssClass="e-small e-danger">
<ProgressButtonSpinSettings Position="SpinPosition.Center"></ProgressButtonSpinSettings>
<ProgressButtonAnimationSettings Effect="AnimationEffect.ZoomOut"></ProgressButtonAnimationSettings>
</EjsProgressButton>
</div>
</div>
<div class="col-xs-6 col-sm-6 col-lg-6 col-md-6">
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Download" EnableProgress="true" Duration=4000 CssClass="e-hide-spinner e-progress-top"
IconCss="e-btn-sb-icons e-download-icon"></EjsProgressButton>
</div>
<div class="col-xs-12 col-sm-12 col-lg-6 col-md-6">
<EjsProgressButton Content="Disabled" Disabled="true"></EjsProgressButton>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
#progress-button-control {
width: 100%;
margin: 8% 0;
text-align: center;
}
@@media only screen and (max-width: 500px) {
#progress-button-control {
margin-left: -11%;
}
}
.progress-button-section {
width: 80%;
margin: auto;
}
#progress-button-control .col-xs-12 {
margin: 18px 0;
}
#contract.e-progress-active .e-btn-content {
display: none;
}
#contract {
transition: all .3s cubic-bezier(.175, .885, .32, 1) 100ms;
}
@@font-face {
font-family: 'button-icons';
src: url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMj1uSf4AAAEoAAAAVmNtYXDOW86iAAABsAAAAFJnbHlmQqasgQAAAiAAAAIYaGVhZBNtzvEAAADQAAAANmhoZWEIUQQNAAAArAAAACRobXR4MAAAAAAAAYAAAAAwbG9jYQNWAsAAAAIEAAAAGm1heHABGAAZAAABCAAAACBuYW1lASvfhQAABDgAAAJhcG9zdHp169UAAAacAAAAxwABAAAEAAAAAFwEAAAAAAAD9AABAAAAAAAAAAAAAAAAAAAADAABAAAAAQAAcRnEB18PPPUACwQAAAAAANgtxQAAAAAA2C3FAAAAAAAD9AP0AAAACAACAAAAAAAAAAEAAAAMAA0AAgAAA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
font-weight: normal;
font-style: normal;
}
.e-btn-sb-icons {
font-family: 'button-icons';
line-height: 1;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.e-play-icon::before {
content: '\e701';
font-size: 12px;
}
.e-bigger .e-play-icon::before {
font-size: 14px;
}
.e-download-icon::before {
content: '\e702';
}
#roundbtn .e-play-icon {
margin-top: -2px;
}
.material #roundbtn .e-play-icon {
margin-top: 0;
}
</style>
@code{
public string CssClass = "e-success e-small";
public void ContractBegin(Syncfusion.EJ2.Blazor.SplitButtons.ProgressEventArgs args)
{
this.CssClass = "e-success e-small e-round";
}
public void ContractEnd(Syncfusion.EJ2.Blazor.SplitButtons.ProgressEventArgs args)
{
this.CssClass = "e-success e-small";
}
}