add notch declaration
This commit is contained in:
1
doric-js/lib/src/native/index.native.d.ts
vendored
1
doric-js/lib/src/native/index.native.d.ts
vendored
@@ -8,3 +8,4 @@ export * from './animate';
|
||||
export * from './notification';
|
||||
export * from './statusbar';
|
||||
export * from './coordinator';
|
||||
export * from './notch';
|
||||
|
@@ -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
9
doric-js/lib/src/native/notch.d.ts
vendored
Normal 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;
|
||||
}>;
|
||||
};
|
7
doric-js/lib/src/native/notch.js
Normal file
7
doric-js/lib/src/native/notch.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export function notch(context) {
|
||||
return {
|
||||
inset: () => {
|
||||
return context.callNative('notch', 'inset', {});
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user