Skip to content

Commit

Permalink
chore: publish v2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aashu-Dubey committed May 14, 2023
1 parent f8c3921 commit 8277622
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Changelog

## [v2.1.0](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/compare/v2.0.0...v2.1.0) - (14 May 2023)

✨ Improvements

- Upgraded plugin to Capacitor v5 ([#8](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/pull/8)) ([Complete changelog](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/pull/8/files)).

## [v2.0.0](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/compare/v1.1.0...v2.0.0) - (1 Apr 2023)

This version adds support for an addition way to handle safe area on device, using `safe-area` web component exported by the plugin.

It can be used as follows:

```html
<safe-area>
<!-- Other content -->
Expand All @@ -14,6 +21,7 @@ It can be used as follows:
It also comes with 2 attributes to control it's behaviour, `mode` and `edges`.

For example, to use safe area insets as element's margin instead of default padding, and to apply only for top, we would write it as follows:

```html
<safe-area mode="margin" edges="top">
<!-- Other content -->
Expand Down
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
})
```

You might also have to empty import the plugin in your root component or at the component level file where you're using the tag

```ts
// app.component.ts or your-component.ts

import '@aashu-dubey/capacitor-statusbar-safe-area';
// or with named import if you're also using other APIs from plugin
// import { SafeArea } from '@aashu-dubey/capacitor-statusbar-safe-area';
```

then just wrap the part you want to apply safe area padding on with `safe-area` tag as below

```html
Expand Down Expand Up @@ -138,10 +148,11 @@ more details [here](#safeareahtmlprops).

## Capacitor version support

| capacitor | plugin version |
| --------- | -------------- |
| v4.x | >= 1.1.0 |
| v3.x | <= 1.0.1 |
| capacitor | plugin version |
| --------- | -------------------- |
| v5.x | 2.1.0 |
| v4.x | >= 1.1.0 && <= 2.0.0 |
| v3.x | <= 1.0.1 |

## API

Expand Down Expand Up @@ -184,7 +195,6 @@ Get the Safe area insets for Android and iOS, and on Web it returns 0 for all.

### Interfaces


#### SafeAreaType

| Prop | Type | Description |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aashu-dubey/capacitor-statusbar-safe-area",
"version": "2.0.0",
"version": "2.1.0",
"description": "Get Status bar height and Safe area insets on Android & iOS.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit 8277622

Please sign in to comment.