0.0.4 • Published 5 years ago

mri-ngx-battery-status v0.0.4

Weekly downloads
18
License
-
Repository
-
Last release
5 years ago

MriNgxBatteryStatus

This library was generated with Angular CLI version 8.2.0.

This library src is available on GitHub.

Installing

 npm i mri-ngx-battery-status --save

Quickstart

Import mri-ngx-battery-status module in Angular app.

     import {MriNgxBatteryStatusModule} from 'mri-ngx-battery-status';

     @NgModule({
       (...)
       imports: [
         MriNgxBatteryStatusModule
       ]
       (...)
     })

##Usage

     <mri-ngx-battery-status
             [height]="20"
             [width]="50"
             [batteryLevel]="79"
             [highThreshold]="66"
             [lowThreshold]="33"
             [batteryBorderColor]="'#000000'"
             [borderRadius]="4"
             [borderThickness]="2"
             [fontSize]="10"
             [textColor]="'#000000'">
     </mri-ngx-battery-status>

##Guide

inputtypedescription
heightnumberit sets the component height
widthnumberit sets the component width
batteryLevelnumberit sets the battery level and it must be between 0 and 100
highThresholdnumberit sets the percentage that we consider the battery level is high
lowThresholdnumberit sets the percentage that we consider the battery level is low
batteryBorderColorstringit sets the battery border color
borderRadiusnumberit sets the border radius
borderThicknessnumberit sets the battery border thickness
fontSizenumberit sets the battery level text font size
textColorstringit sets battery level text color

Run ng generate component component-name --project mri-ngx-battery-status to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project mri-ngx-battery-status.

Note: Don't forget to add --project mri-ngx-battery-status or else it will be added to the default project in your angular.json file.

Build

Run ng build mri-ngx-battery-status to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build mri-ngx-battery-status, go to the dist folder cd dist/mri-ngx-battery-status and run npm publish.

Running unit tests

Run ng test mri-ngx-battery-status to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago