add notch declaration

This commit is contained in:
王劲鹏
2020-03-19 14:32:42 +08:00
committed by osborn
parent 06562aa665
commit f9a86a7f88
13 changed files with 132 additions and 1 deletions

View File

@@ -8,3 +8,4 @@ export * from './animate';
export * from './notification';
export * from './statusbar';
export * from './coordinator';
export * from './notch';

View File

@@ -23,3 +23,4 @@ export * from './animate';
export * from './notification';
export * from './statusbar';
export * from './coordinator';
export * from './notch';

9
doric-js/lib/src/native/notch.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
import { BridgeContext } from "../runtime/global";
export declare function notch(context: BridgeContext): {
inset: () => Promise<{
top: number;
left: number;
bottom: number;
right: number;
}>;
};

View File

@@ -0,0 +1,7 @@
export function notch(context) {
return {
inset: () => {
return context.callNative('notch', 'inset', {});
}
};
}