Browse Source

update switch

pull/49/head
yiminghe 9 years ago
parent
commit
70fc084e44
  1. 6
      components/switch/demo/disabled.md
  2. 2
      components/switch/index.md
  3. 32
      style/components/switch.less

6
components/switch/demo/disabled.md

@ -1,8 +1,8 @@
# 简单
# 不可用
- order: 1
最简单的用法
Switch 失效状态
---
@ -13,7 +13,7 @@ var container = document.getElementById('components-switch-demo-disabled');
var Test = React.createClass({
getInitialState() {
return {
disabled: false
disabled: true
}
},
toggle(){

2
components/switch/index.md

@ -6,7 +6,7 @@
---
开关选择器
开关选择器
## 何时使用

32
style/components/switch.less

@ -33,16 +33,10 @@
background-color: #ffffff;
content: " ";
cursor: pointer;
transform: scale(1);
transition: left @switch-duration @ease-in-out-circ;
animation-timing-function: linear;
animation-duration: @switch-duration;
animation-name: rcSwitchOff;
}
&:hover:after{
transform: scale(1.1);
animation-name: rcSwitchOn;
}
&-checked{
@ -65,13 +59,10 @@
&:after{
background: #ccc;
animation-name: none;
cursor: no-drop;
}
&:hover:after{
transform: scale(1);
animation-name: none;
}
&-inner {
@ -79,26 +70,3 @@
}
}
}
@keyframes rcSwitchOn {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1.1);
}
}
@keyframes rcSwitchOff {
0% {
transform: scale(1.1);
}
50%{
transform: scale(.9);
}
100% {
transform: scale(1);
}
}

Loading…
Cancel
Save