From 8c22015207c1927b27c90b4bf0f40dc9c56d2fe5 Mon Sep 17 00:00:00 2001 From: afc163 Date: Sun, 22 Oct 2017 16:53:12 +0800 Subject: Fix disabled style, close #58 --- assets/index/Picker.less | 5 +++++ 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 @@ border: 1px solid #d9d9d9; border-radius: 4px; 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); + &[disabled] { + color: #ccc; + background: #f7f7f7; + cursor: not-allowed; + } } } 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) { } ReactDom.render( - , - document.getElementById('__react-content') -); +
+

Disabled picker

+ +

Disabled options

+ +
+, document.getElementById('__react-content')); -- cgit v1.2.3