From 0a3cafcedb368ca5e1e10d4df135a34fa9a184d5 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 29 Apr 2020 20:12:30 +0800 Subject: [PATCH] style(ActionSheet): improve text size adjust (#6175) --- src/action-sheet/index.less | 9 +++------ src/action-sheet/index.tsx | 7 ++++--- src/action-sheet/test/__snapshots__/index.spec.js.snap | 10 ++++++++-- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/action-sheet/index.less b/src/action-sheet/index.less index 4e7081ad3..c2ccebc5e 100644 --- a/src/action-sheet/index.less +++ b/src/action-sheet/index.less @@ -8,10 +8,10 @@ &__cancel { display: block; width: 100%; + height: @action-sheet-item-height; padding: 0; font-size: @action-sheet-item-font-size; - line-height: @action-sheet-item-height; - text-align: center; + line-height: 20px; background-color: @action-sheet-item-background; border: none; cursor: pointer; @@ -22,8 +22,6 @@ } &__item { - height: @action-sheet-item-height; - &--loading, &--disabled { color: @action-sheet-item-disabled-text-color; @@ -48,11 +46,10 @@ font-size: @action-sheet-subname-font-size; } - &__cancel::before { + &__gap { display: block; height: @action-sheet-cancel-padding-top; background-color: @action-sheet-cancel-padding-color; - content: ' '; } &__header { diff --git a/src/action-sheet/index.tsx b/src/action-sheet/index.tsx index 3bd38b011..cc7089c11 100644 --- a/src/action-sheet/index.tsx +++ b/src/action-sheet/index.tsx @@ -121,11 +121,12 @@ function ActionSheet( function CancelText() { if (cancelText) { - return ( + return [ +
, - ); + , + ]; } } diff --git a/src/action-sheet/test/__snapshots__/index.spec.js.snap b/src/action-sheet/test/__snapshots__/index.spec.js.snap index 09499d477..d961c16f6 100644 --- a/src/action-sheet/test/__snapshots__/index.spec.js.snap +++ b/src/action-sheet/test/__snapshots__/index.spec.js.snap @@ -3,7 +3,9 @@ exports[`callback events 1`] = `
+ +
+
`; exports[`close-icon prop 1`] = ` @@ -21,7 +23,11 @@ exports[`description prop 1`] = ` `; -exports[`disable lazy-render 1`] = ``; +exports[`disable lazy-render 1`] = ` + +`; exports[`render title and default slot 1`] = `