Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taichi-t/weather-react-icons
☀️☔️ A React component for weather icons for use with Open Weather and Yahoo Weather APIs
https://github.com/taichi-t/weather-react-icons
npm npm-package typescript weather-react-icons
Last synced: 9 days ago
JSON representation
☀️☔️ A React component for weather icons for use with Open Weather and Yahoo Weather APIs
- Host: GitHub
- URL: https://github.com/taichi-t/weather-react-icons
- Owner: taichi-t
- License: mit
- Created: 2020-12-29T14:06:47.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T19:45:38.000Z (about 2 years ago)
- Last Synced: 2023-12-09T17:21:17.966Z (about 1 year ago)
- Topics: npm, npm-package, typescript, weather-react-icons
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/weather-react-icons
- Size: 1.17 MB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# weather-react-icons
![npm](https://img.shields.io/npm/v/weather-react-icons) [![Build Status](https://travis-ci.org/taichi-t/weather-react-icons.svg?branch=master)](https://travis-ci.org/taichi-t/weather-react-icons) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) ![npm bundle size](https://img.shields.io/bundlephobia/min/weather-react-icons)
A React component for weather icons for use with Open Weather and Yahoo Weather APIs.
## Installaion
`$ npm i weather-react-icons`
## Usage
```javascript
import * as React from 'react';
// The following CSS file must be installed for use of WeatherIcon.
import 'weather-react-icons/lib/css/weather-icons.css';
import { WeatherIcon } from 'weather-react-icons';const Weather = () => {
return ;
};
```## WeatherIcon Params
| Name | Type | Required? | default | Description |
| :-------: | :--------------: | --------- | :-----: | :------------------------------------------------------------------------------: |
| iconId | number | Required | | Icon Id that OpenWeatherMap and Yahoo Weather API provides. |
| name | `owm` or `yahoo` | Required | | API name you use. |
| night | boolean | Optional | false | If sets true, icons change to night icons. (note: night is only for "owe" icons) |
| className | string | Optional | | Your own className. |## CSS usage
if only use CSS files, import them as follows,
```
import 'weather-react-icons/lib/css/weather-icons.css';
import 'weather-react-icons/lib/css/weather-icons-wind.css';
```## Resources
- [Open Weather API](https://openweathermap.org/) : A scientific yet simple approach to weather forecast. Free. No ads.
- [Yahoo Weather API](https://developer.yahoo.com/weather/) : Get up-to-date weather information for any location, including 10-day forecast, wind, atmosphere, astronomy conditions, and more. You can lookup weather by location (city name) or lat/long.
- [Weather icons](https://erikflowers.github.io/weather-icons/) : The repository is created by [@erikflowers](https://github.com/erikflowers)## Licensing
- Weather Icons licensed under [SIL OFL 1.1](http://scripts.sil.org/OFL)
- Code licensed under [MIT License](http://opensource.org/licenses/mit-license.html)