[new feature] Toast: add icon prop (#3485)

This commit is contained in:
neverland
2019-06-12 17:21:59 +08:00
committed by GitHub
parent 2d18f67a7d
commit 153fb9d69f
15 changed files with 185 additions and 48 deletions
+18 -16
View File
@@ -11,8 +11,10 @@
box-sizing: content-box;
// hack for avoid max-width when use left & fixed
width: fit-content;
width: @toast-default-width;
max-width: @toast-max-width;
min-height: @toast-default-min-height;
padding: @toast-default-padding;
color: @toast-text-color;
font-size: @toast-font-size;
line-height: @toast-line-height;
@@ -34,25 +36,13 @@
}
&--text {
width: fit-content;
min-width: @toast-text-min-width;
min-height: unset;
padding: @toast-text-padding;
}
&--default {
width: @toast-default-width;
min-height: @toast-default-min-height;
padding: @toast-default-padding;
.van-toast__icon {
font-size: @toast-icon-size;
}
.van-loading {
margin: 10px 0;
}
.van-toast__text {
padding-top: 5px;
margin-top: 0;
}
}
@@ -64,4 +54,16 @@
top: auto;
bottom: @toast-position-bottom-distance;
}
&__icon {
font-size: @toast-icon-size;
}
&__loading {
padding: 5px;
}
&__text {
margin-top: 10px;
}
}