feat: improve cursor
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user