nativescript-playground-bar
Set the status bar in NativeScripts' Playground to light or dark content.
npm i --save nativescript-playground-bar
- Version: 1.0.0
- GitHub: https://github.com/mudlabs/nativescript-playground-bar
- NPM: https://www.npmjs.com/package/nativescript-playground-bar
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
nativescript-playground-bar
A plugin for your NativeScript Playground projects to help implement a light or dark content status bar.
Installation
- From the Playground UI select
Add NPM package
(via the Explorer popup menu). - Enter
nativescript-playground-bar
as the NPM package name. - Click Add.
Usage
// main-page.js
const PlaygroundBar = require("~/nativescript-playgroundbar");
exports.pageLoaded = function (args) {
PlaygroundBar.lightContent(args.object);
}
Methods
lightContent
Sets the iOS
status bar to light content.
Arguments | Required | Default | Description |
---|---|---|---|
page | yes | n/a | The current page with the status bar you want to change. |
timeout | no | 10 | Specifies the time (in milliseconds) you want to delay the change of style. |
darkContent
Sets the iOS
status bar to dark content, which is the playgrounds default style.
Arguments | Required | Default | Description |
---|---|---|---|
page | yes | n/a | The current page with the status bar you want to change. |
timeout | no | 10 | Specifies the time (in milliseconds) you want to delay the change of style. |