@@ -2,11 +2,6 @@ import React from 'react';
22import { Button } from '../src' ;
33
44export default ( ) => {
5- const options = [
6- { label : 'Action' , value : 'v1' } ,
7- { label : 'Another action' , value : 'v2' } ,
8- { label : 'Something else here' , value : 'v3' }
9- ] ;
105 return (
116 < div >
127 < h4 > Drop-down Buttons</ h4 >
@@ -16,40 +11,73 @@ export default () => {
1611 < Button
1712 dropdown
1813 placeholder = "Select..."
19- options = { options }
14+ options = { [
15+ { label : 'Action' , value : 'v1' } ,
16+ { label : 'Another action' , value : 'v2' } ,
17+ { label : 'Something else here' , value : 'v3' }
18+ ] }
2019 onChange = { ( selectedOption ) => {
2120 if ( selectedOption ) {
2221 console . log ( 'label =' + selectedOption . label + ', value = ' + selectedOption . value ) ;
2322 }
2423 } }
2524 />
26- < br /> < br / >
27-
25+ </ div >
26+ < div >
2827 < p > < strong > Split</ strong > </ p >
2928 < Button
3029 dropdown
3130 dropdownStyle = "split"
3231 placeholder = "Select..."
33- options = { options }
32+ options = { [
33+ { label : 'Action' , value : 'v1' } ,
34+ { label : 'Another action' , value : 'v2' } ,
35+ { label : 'Something else here' , value : 'v3' }
36+ ] }
3437 value = "v1"
3538 />
36- < br /> < br />
37-
39+ </ div >
40+ < br /> < br />
41+ < div >
42+ < p > < strong > Fixed width</ strong > </ p >
43+ < Button
44+ dropdown
45+ placeholder = "Select..."
46+ options = { [
47+ { label : 'Action' , value : 'v1' } ,
48+ { label : 'Another action' , value : 'v2' } ,
49+ { label : 'Something else here' , value : 'v3' }
50+ ] }
51+ value = "v1"
52+ fixedWidth = { true }
53+ />
54+ </ div >
55+ < br /> < br />
56+ < div >
3857 < p > < strong > Text</ strong > </ p >
3958 < Button
4059 dropdown
4160 dropdownStyle = "text"
42- options = { options }
61+ options = { [
62+ { label : 'Action' , value : 'v1' } ,
63+ { label : 'Another action' , value : 'v2' } ,
64+ { label : 'Something else here' , value : 'v3' }
65+ ] }
4366 >
4467 All Devices
4568 </ Button >
46- < br /> < br / >
47-
69+ </ div >
70+ < div >
4871 < p > < strong > Icon</ strong > </ p >
4972 < Button
5073 dropdown
5174 dropdownStyle = "text"
52- options = { options }
75+ options = { [
76+ { label : 'Action' , value : 'v1' } ,
77+ { label : 'Another action' , value : 'v2' } ,
78+ { label : 'Something else here' , value : 'v3' }
79+ ] }
80+ value = "v1"
5381 customedValueRenderer = { ( option ) => {
5482 return (
5583 < div >
@@ -58,10 +86,10 @@ export default () => {
5886 </ div >
5987 ) ;
6088 } }
61- >
62- All Devices
63- </ Button >
64-
89+ / >
90+ </ div >
91+ < br /> < br / >
92+ < div >
6593 < p > < strong > Sizes</ strong > </ p >
6694 < Button btnSize = "large" dropdown > Large</ Button >
6795 < Button btnSize = "medium" dropdown > Default</ Button >
0 commit comments