From cfb162a20ad6d91e98d978bb73c1364541eb340a Mon Sep 17 00:00:00 2001 From: Ashutosh Date: Sun, 18 Jun 2023 00:26:30 +0530 Subject: [PATCH] docs update & removed `SafeAreaElement` class export --- README.md | 6 +++--- ios/PluginTests/SafeAreaTests.swift | 14 +++++++------- src/element.ts | 2 +- src/index.ts | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 7fffba9..eb1002e 100644 --- a/README.md +++ b/README.md @@ -183,12 +183,12 @@ Get the Status bar height on Android and iOS, and on Web it returns 0. ### getSafeAreaInsets() ```typescript -getSafeAreaInsets() => Promise +getSafeAreaInsets() => Promise ``` Get the Safe area insets for Android and iOS, and on Web it returns 0 for all. -**Returns:** Promise<SafeAreaType> +**Returns:** Promise<SafeAreaInset> -------------------- @@ -196,7 +196,7 @@ Get the Safe area insets for Android and iOS, and on Web it returns 0 for all. ### Interfaces -#### SafeAreaType +#### SafeAreaInset | Prop | Type | Description | | ------------ | ------------------- | -------------------------------- | diff --git a/ios/PluginTests/SafeAreaTests.swift b/ios/PluginTests/SafeAreaTests.swift index b39ab03..b29062e 100644 --- a/ios/PluginTests/SafeAreaTests.swift +++ b/ios/PluginTests/SafeAreaTests.swift @@ -13,13 +13,13 @@ class SafeAreaTests: XCTestCase { } /* func testEcho() { - // This is an example of a functional test case for a plugin. - // Use XCTAssert and related functions to verify your tests produce the correct results. + // This is an example of a functional test case for a plugin. + // Use XCTAssert and related functions to verify your tests produce the correct results. - let implementation = SafeArea() - let value = "Hello, World!" - let result = implementation.echo(value) + let implementation = SafeArea() + let value = "Hello, World!" + let result = implementation.echo(value) - XCTAssertEqual(value, result) - } */ + XCTAssertEqual(value, result) + } */ } diff --git a/src/element.ts b/src/element.ts index fa58426..4d5dd21 100644 --- a/src/element.ts +++ b/src/element.ts @@ -1,6 +1,6 @@ import { SafeArea } from './index'; -export class SafeAreaElement extends HTMLElement { +class SafeAreaElement extends HTMLElement { mode: 'padding' | 'margin'; edges?: string; diff --git a/src/index.ts b/src/index.ts index a7a31e3..922d630 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import { registerPlugin } from '@capacitor/core'; import { SafeAreaController } from './controller'; import type { SafeAreaPlugin, SafeAreaHTMLProps } from './definitions'; -import { SafeAreaElement, registerSafeAreaElement } from './element'; +import { registerSafeAreaElement } from './element'; const SafeArea = registerPlugin('SafeArea', { web: () => import('./web').then(m => new m.SafeAreaWeb()), @@ -13,7 +13,7 @@ const controller = new SafeAreaController(); export * from './definitions'; export { SafeArea }; export { controller as SafeAreaController }; -export { SafeAreaElement, registerSafeAreaElement }; +export { registerSafeAreaElement }; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace