[new feature] Actionsheet: add safe-area-inset-bottom prop (#3171)

This commit is contained in:
neverland
2019-04-18 17:47:44 +08:00
committed by GitHub
parent 2b44f1a8dd
commit 83daca3f8d
9 changed files with 14 additions and 9 deletions
+3 -1
View File
@@ -23,6 +23,7 @@ export type ActionsheetProps = PopupMixinProps & {
title?: string;
actions: ActionsheetItem[];
cancelText?: string;
safeAreaInsetBottom?: boolean;
};
const [sfc, bem] = use('actionsheet');
@@ -79,7 +80,7 @@ function Actionsheet(
return (
<Popup
class={bem()}
class={bem({ 'safe-area-inset-bottom': props.safeAreaInsetBottom })}
value={props.value}
position="bottom"
overlay={props.overlay}
@@ -107,6 +108,7 @@ Actionsheet.props = {
title: String,
actions: Array,
cancelText: String,
safeAreaInsetBottom: Boolean,
overlay: {
type: Boolean,
default: true