@@ -3,6 +3,7 @@ var mui = require('mui');
3
3
var FlatButton = mui . FlatButton ;
4
4
var FloatingActionButton = mui . FloatingActionButton ;
5
5
var RaisedButton = mui . RaisedButton ;
6
+ var FontIcon = mui . FontIcon ;
6
7
var ComponentDoc = require ( '../../component-doc.jsx' ) ;
7
8
8
9
var ButtonPage = React . createClass ( {
@@ -14,11 +15,31 @@ var ButtonPage = React.createClass({
14
15
'<FlatButton label="Default" />\n' +
15
16
'<FlatButton label="Primary" primary={true} />\n' +
16
17
'<FlatButton label="Secondary" secondary={true} />\n' +
18
+ '<FlatButton secondary={true}>\n' +
19
+ ' <span className="mui-flat-button-label example-image-button">Choose an Image</span>\n' +
20
+ ' <input type="file" id="imageButton" className="example-image-input"></input>\n' +
21
+ '</FlatButton>\n' +
22
+ '<div className="button-example-container">\n' +
23
+ ' <FlatButton linkButton={true} href="https://github.com/callemall/material-ui" secondary={true}>\n' +
24
+ ' <FontIcon className="muidocs-icon-custom-github example-flat-button-icon"/>\n' +
25
+ ' <span className="mui-flat-button-label">Github</span>\n' +
26
+ ' </FlatButton>\n' +
27
+ '</div>\n' +
17
28
'<FlatButton label="Disabled" disabled={true} />\n\n' +
18
29
'//Raised Buttons\n' +
19
30
'<RaisedButton label="Default" />\n' +
20
31
'<RaisedButton label="Primary" primary={true} />\n' +
21
32
'<RaisedButton label="Secondary" secondary={true} />\n' +
33
+ '<RaisedButton secondary={true}>\n' +
34
+ ' <span className="mui-raised-button-label example-image-button">Choose an Image</span>\n' +
35
+ ' <input type="file" id="imageButton" className="example-image-input"></input>\n' +
36
+ '</RaisedButton>\n' +
37
+ '<div className="button-example-container">\n' +
38
+ ' <RaisedButton linkButton={true} href="https://github.com/callemall/material-ui" secondary={true}>\n' +
39
+ ' <FontIcon className="muidocs-icon-custom-github example-button-icon"/>\n' +
40
+ ' <span className="mui-raised-button-label example-icon-button-label">Github</span>\n' +
41
+ ' </RaisedButton>\n' +
42
+ '</div>\n' +
22
43
'<RaisedButton label="Disabled" disabled={true} />\n\n' +
23
44
'//Floating Action Buttons\n' +
24
45
'<FloatingActionButton iconClassName="muidocs-icon-action-grade" />\n' +
@@ -37,11 +58,13 @@ var ButtonPage = React.createClass({
37
58
name : 'Flat Button' ,
38
59
infoArray : [
39
60
{
40
- name : 'label' ,
41
- type : 'string' ,
61
+ name : 'label or children ' ,
62
+ type : 'string (label) or HTML/React elements (children) ' ,
42
63
header : 'required' ,
43
- desc : 'This is the text to display inside the button. This only applies to flat and ' +
44
- 'raised buttons.'
64
+ desc : 'This is what will be displayed inside the button. If a label is specified, the text within the label prop will be displayed.' +
65
+ ' Otherwise, the component will expect children which will then be displayed (in our example, we are nesting an <input type="file" />' +
66
+ 'and a span that acts as our label to be displayed.) ' +
67
+ 'This only applies to flat and raised buttons.'
45
68
} ,
46
69
{
47
70
name : 'linkButton' ,
@@ -67,11 +90,13 @@ var ButtonPage = React.createClass({
67
90
name : 'Raised Button' ,
68
91
infoArray : [
69
92
{
70
- name : 'label' ,
71
- type : 'string' ,
93
+ name : 'label or children ' ,
94
+ type : 'string (label) or HTML/React elements (children) ' ,
72
95
header : 'required' ,
73
- desc : 'This is the text to display inside the button. This only applies to flat and ' +
74
- 'raised buttons.'
96
+ desc : 'This is what will be displayed inside the button. If a label is specified, the text within the label prop will be displayed.' +
97
+ ' Otherwise, the component will expect children which will then be displayed (in our example, we are nesting an <input type="file" />' +
98
+ 'and a span that acts as our label to be displayed.) ' +
99
+ 'This only applies to flat and raised buttons.'
75
100
} ,
76
101
{
77
102
name : 'linkButton' ,
@@ -145,6 +170,18 @@ var ButtonPage = React.createClass({
145
170
< div className = "button-example-container" >
146
171
< FlatButton label = "Secondary" secondary = { true } />
147
172
</ div >
173
+ < div className = "button-example-container" >
174
+ < FlatButton secondary = { true } >
175
+ < span className = "mui-flat-button-label example-image-button" > Choose an Image</ span >
176
+ < input type = "file" id = "imageButton" className = "example-image-input" > </ input >
177
+ </ FlatButton >
178
+ </ div >
179
+ < div className = "button-example-container" >
180
+ < FlatButton linkButton = { true } href = "https://github.com/callemall/material-ui" secondary = { true } >
181
+ < FontIcon className = "muidocs-icon-custom-github example-flat-button-icon" />
182
+ < span className = "mui-flat-button-label" > Github</ span >
183
+ </ FlatButton >
184
+ </ div >
148
185
< div className = "button-example-container" >
149
186
< FlatButton label = "Disabled" disabled = { true } />
150
187
</ div >
@@ -160,6 +197,18 @@ var ButtonPage = React.createClass({
160
197
< div className = "button-example-container" >
161
198
< RaisedButton label = "Secondary" secondary = { true } />
162
199
</ div >
200
+ < div className = "button-example-container" >
201
+ < RaisedButton secondary = { true } >
202
+ < span className = "mui-raised-button-label example-image-button" > Choose an Image</ span >
203
+ < input type = "file" className = "example-image-input" > </ input >
204
+ </ RaisedButton >
205
+ </ div >
206
+ < div className = "button-example-container" >
207
+ < RaisedButton linkButton = { true } href = "https://github.com/callemall/material-ui" secondary = { true } >
208
+ < FontIcon className = "muidocs-icon-custom-github example-button-icon" />
209
+ < span className = "mui-raised-button-label example-icon-button-label" > Github</ span >
210
+ </ RaisedButton >
211
+ </ div >
163
212
< div className = "button-example-container" >
164
213
< RaisedButton label = "Disabled" disabled = { true } />
165
214
</ div >
0 commit comments