feat: improve cursor

This commit is contained in:
陈嘉涵
2020-01-11 15:46:47 +08:00
parent 5cbb9e2998
commit 2eb680723d
33 changed files with 97 additions and 24 deletions
+6
View File
@@ -10,6 +10,7 @@
background-color: @switch-background-color;
border: @switch-border;
border-radius: @switch-node-size;
cursor: pointer;
transition: background-color @switch-transition-duration;
&__node {
@@ -42,6 +43,11 @@
}
&--disabled {
cursor: not-allowed;
opacity: @switch-disabled-opacity;
}
&--loading {
cursor: default;
}
}
+1
View File
@@ -54,6 +54,7 @@ function Switch(
<div
class={bem({
on: checked,
loading,
disabled
})}
role="switch"
@@ -13,7 +13,7 @@ exports[`renders demo correctly 1`] = `
</div>
</div>
<div>
<div role="switch" aria-checked="true" class="van-switch van-switch--on">
<div role="switch" aria-checked="true" class="van-switch van-switch--on van-switch--loading">
<div class="van-switch__node">
<div class="van-loading van-loading--circular van-switch__loading"><span class="van-loading__spinner van-loading__spinner--circular" style="color: rgb(25, 137, 250);"><svg viewBox="25 25 50 50" class="van-loading__circular"><circle cx="50" cy="50" r="20" fill="none"></circle></svg></span></div>
</div>