feat(ActionSheet): add close-icon prop (#5016)

This commit is contained in:
neverland
2019-11-14 19:52:30 +08:00
committed by GitHub
parent f871c84b18
commit 5d157c409b
3 changed files with 33 additions and 2 deletions
+6 -1
View File
@@ -26,6 +26,7 @@ export type ActionSheetProps = PopupMixinProps & {
title?: string;
actions?: ActionSheetItem[];
duration: number;
closeIcon: string;
cancelText?: string;
description?: string;
closeOnClickAction?: boolean;
@@ -52,7 +53,7 @@ function ActionSheet(
return (
<div class={[bem('header'), BORDER_BOTTOM]}>
{title}
<Icon name="close" class={bem('close')} onClick={onCancel} />
<Icon name={props.closeIcon} class={bem('close')} onClick={onCancel} />
</div>
);
}
@@ -158,6 +159,10 @@ ActionSheet.props = {
type: Boolean,
default: true
},
closeIcon: {
type: String,
default: 'close'
},
safeAreaInsetBottom: {
type: Boolean,
default: true