1.0.4 • Published 5 years ago

weather-widget-react v1.0.4

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

weather-widget-react is a module to display weather information.


Installation

Use the package manager npm to install widget.

npm install weather-widget-react

Usage

import WeatherWidget from 'weather-widget-react';

  <WeatherWidget
    apiKey='7cc0a3060e58f17a24e70b46ad9ed851'
    position='top-left'
    location='London'
    units='metric'
    lang='eng'
  />,

Props

  • apiKey: string - Open weather api key (Передается ключ для апи)
  • location: string | null - weather location (Название города для которого выводить погоду, если null то брать текущую локацию браузера)
  • units: string - Metric/Imperial units (Единицы измерения градусы цельсия или фаренгейта)
  • lang: string - Russian / English language (Выбор языка отображения) (в дальнейшем с возможностью расширения)
  • position: string - top-left / top-right / bottom-left / bottom-right (Метоположение виджета на странице)

License

License

Licensed under The MIT License (MIT) For the full copyright and license information, please view the LICENSE.txt file.

MIT license