Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Very basic weather applet for React with icons

Notifications You must be signed in to change notification settings

iruszpel/simple-react-weather

Repository files navigation

simple-react-weather

Very basic weather applet for React with icons from react-icons-weather
Demo available here

NPM JavaScript Style Guide

Install

npm install --save simple-react-weather

Usage

import React, { Component } from 'react'
import Weather from 'simple-react-weather'

class Example extends Component {
  render () {
    return (
      //With city name provided
      <Weather unit="C" city="CITY" appid="YOUR APPID FROM OWM" />
      //Based on latitude and longitude
      <Weather unit="C" lat="" lon="" appid="YOUR APPID FROM OWM" />
    )
  }
}

Props

unit: String
C for Celcius, F for Fahrenheit
lat/lon: Number
Latitude and longitude, can be acquired from navigator.geolocation.getCurrentPosition()
city: String
appid: String
Your AppId from OWM

You can also use all other custom props like onClick, id etc.

License

GNU GPLv3 © iruszpel

About

Very basic weather applet for React with icons

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published