feat(ShareSheet): add less vars

This commit is contained in:
chenjiahan 2020-04-09 11:45:09 +08:00 committed by neverland
parent 08b6623a1d
commit ba32ba3404
2 changed files with 29 additions and 15 deletions

View File

@ -3,24 +3,24 @@
.van-share-sheet { .van-share-sheet {
&__header { &__header {
padding: 12px @padding-md @padding-base; padding: @share-sheet-header-padding;
text-align: center; text-align: center;
} }
&__title { &__title {
margin-top: @padding-xs; margin-top: @padding-xs;
color: @text-color; color: @share-sheet-title-color;
font-weight: normal; font-weight: normal;
font-size: @font-size-md; font-size: @share-sheet-title-font-size;
line-height: 20px; line-height: @share-sheet-title-line-height;
} }
&__description { &__description {
display: block; display: block;
margin-top: @padding-xs; margin-top: @padding-xs;
color: @gray-6; color: @share-sheet-description-color;
font-size: @font-size-sm; font-size: @share-sheet-description-font-size;
line-height: 16px; line-height: @share-sheet-description-line-height;
} }
&__options { &__options {
@ -48,7 +48,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
margin-right: @padding-xl; margin-right: @share-sheet-option-margin-right;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
@ -62,24 +62,24 @@
} }
&__icon { &__icon {
width: 48px; width: @share-sheet-icon-size;
height: 48px; height: @share-sheet-icon-size;
} }
&__name { &__name {
margin-top: @padding-xs; margin-top: @padding-xs;
color: @gray-7; color: @share-sheet-option-name-color;
font-size: @font-size-sm; font-size: @share-sheet-option-name-font-size;
} }
&__cancel { &__cancel {
display: block; display: block;
width: 100%; width: 100%;
padding: 0; padding: 0;
font-size: @font-size-lg; font-size: @share-sheet-cancel-button-font-size;
line-height: 48px; line-height: @share-sheet-cancel-button-height;
text-align: center; text-align: center;
background-color: @white; background: @share-sheet-cancel-button-background;
border: none; border: none;
cursor: pointer; cursor: pointer;

View File

@ -585,6 +585,20 @@
@rate-icon-disabled-color: #bdbdbd; @rate-icon-disabled-color: #bdbdbd;
// ShareSheet // ShareSheet
@share-sheet-header-padding: @padding-sm @padding-md @padding-base;
@share-sheet-title-color: @text-color;
@share-sheet-title-font-size: @font-size-md;
@share-sheet-title-line-height: 20px;
@share-sheet-description-color: @gray-6;
@share-sheet-description-font-size: @font-size-sm;
@share-sheet-description-line-height: 16px;
@share-sheet-icon-size: 48px;
@share-sheet-option-margin-right: @padding-xl;
@share-sheet-option-name-color: @gray-7;
@share-sheet-option-name-font-size: @font-size-sm;
@share-sheet-cancel-button-font-size: @font-size-lg;
@share-sheet-cancel-button-height: 48px;
@share-sheet-cancel-button-background: @white;
// Search // Search
@search-padding: 10px @padding-sm; @search-padding: 10px @padding-sm;