diff options
author | afc163 <afc163@gmail.com> | 2017-10-22 16:53:12 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2017-10-22 16:53:12 +0800 |
commit | 8c22015207c1927b27c90b4bf0f40dc9c56d2fe5 (patch) | |
tree | 22cd19f7f496b4e59e6211c4c63a25144c86a833 | |
parent | 2c639dd696bd05c5bde5f90c3188a789f203b442 (diff) | |
download | time-picker-8c22015207c1927b27c90b4bf0f40dc9c56d2fe5.tar.gz time-picker-8c22015207c1927b27c90b4bf0f40dc9c56d2fe5.tar.zst time-picker-8c22015207c1927b27c90b4bf0f40dc9c56d2fe5.zip |
Fix disabled style, close #58
-rw-r--r-- | assets/index/Picker.less | 5 | ||||
-rw-r--r-- | examples/disabled.js | 30 |
2 files changed, 24 insertions, 11 deletions
diff --git a/assets/index/Picker.less b/assets/index/Picker.less index 1fb3787..610c2b0 100644 --- a/assets/index/Picker.less +++ b/assets/index/Picker.less | |||
@@ -14,5 +14,10 @@ | |||
14 | border: 1px solid #d9d9d9; | 14 | border: 1px solid #d9d9d9; |
15 | border-radius: 4px; | 15 | border-radius: 4px; |
16 | transition: border .2s cubic-bezier(0.645, 0.045, 0.355, 1), background .2s cubic-bezier(0.645, 0.045, 0.355, 1), box-shadow .2s cubic-bezier(0.645, 0.045, 0.355, 1); | 16 | transition: border .2s cubic-bezier(0.645, 0.045, 0.355, 1), background .2s cubic-bezier(0.645, 0.045, 0.355, 1), box-shadow .2s cubic-bezier(0.645, 0.045, 0.355, 1); |
17 | &[disabled] { | ||
18 | color: #ccc; | ||
19 | background: #f7f7f7; | ||
20 | cursor: not-allowed; | ||
21 | } | ||
17 | } | 22 | } |
18 | } | 23 | } |
diff --git a/examples/disabled.js b/examples/disabled.js index 9d74002..a38ce16 100644 --- a/examples/disabled.js +++ b/examples/disabled.js | |||
@@ -48,14 +48,22 @@ function disabledSeconds(h, m) { | |||
48 | } | 48 | } |
49 | 49 | ||
50 | ReactDom.render( | 50 | ReactDom.render( |
51 | <TimePicker | 51 | <div> |
52 | showSecond={showSecond} | 52 | <h3>Disabled picker</h3> |
53 | defaultValue={now} | 53 | <TimePicker |
54 | className="xxx" | 54 | defaultValue={now} |
55 | onChange={onChange} | 55 | disabled |
56 | disabledHours={disabledHours} | 56 | onChange={onChange} |
57 | disabledMinutes={disabledMinutes} | 57 | /> |
58 | disabledSeconds={disabledSeconds} | 58 | <h3>Disabled options</h3> |
59 | />, | 59 | <TimePicker |
60 | document.getElementById('__react-content') | 60 | showSecond={showSecond} |
61 | ); | 61 | defaultValue={now} |
62 | className="xxx" | ||
63 | onChange={onChange} | ||
64 | disabledHours={disabledHours} | ||
65 | disabledMinutes={disabledMinutes} | ||
66 | disabledSeconds={disabledSeconds} | ||
67 | /> | ||
68 | </div> | ||
69 | , document.getElementById('__react-content')); | ||