npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

weather-app-ps

v0.1.11

Published

`import { WeatherApp } from 'weather-app-ps/dist/cjs'`

Downloads

19

Readme

Import the component on a React project

import { WeatherApp } from 'weather-app-ps/dist/cjs'

Use the component on a React project

<WeatherApp/>

Personalise texts

The component includes default texts that can be modified by passing an object to the component

Example

export const texts: IWeatherAppTexts = {
    cityFinderTexts: {
        placeholder: "Enter your city",
        errorMessage: "Please select a city from the list"
    },
    bannerForecastDaysTexts: {
        title: "5 DAY FORECAST"
    },
    bannerForecastHoursTexts: {
        title: "5 DAY FORECAST FOR",
        btnTemp: "TEMPERATURE (C)",
        btnRain: "RAIN (MM)",
        btnWind: "WIND (KM/H)",
    },
    bannerAirConditionsTexts: {
        title: "AIR CONDITIONS",
        feelsLike: "Feels like",
        humidity: "Humidity",
        wind: "Wind"
    }
}

Adding the component with the new texts

Add new object with texts property:

<WeatherApp texts={texts}/>

Personalised styles

The component includes a series of css variables that can be overriten in order to modify the style

Available variables and default values

/* padding */
--pd-xs: 5px;
--pd-sm: 10px;
--pd-md: 15px;
--pd-lg: 20px;
--pd-xl: 30px;
--pd-xl: 40px;
--pd-2xl: 50px;

--pd-screen: var(--pd-md);
--pd-fullwidth: 0 5vw;

--pd-inner-component: var(--pd-lg);

/* Margins */
--mg-xs: 5px;
--mg-sm: 10px;
--mg-md: 15px;
--mg-lg: 20px;
--mg-xl: 30px;
--mg-xl: 40px;
--mg-2xl: 50px;

--mg-between-components: var(--mg-lg);

/* Sizes */
--sz-content: 100%;

/* Colors */
--c-black: hsl(0, 0%, 4%);
--c-grey: hsl(0, 0%, 50%);
--c-grey-light: hsl(0, 0%, 83%);

/* Backgrounds */
--bg-main: hsl(0, 0%, 100%);
--bg-box-content: rgb(246, 247, 252);
--bg-grey-hover: hsl(0, 0%, 90%);
--bg-grey-selected: hsl(0, 0%, 85%);

/* Transitions */
--tr-base: 0.3s;

/* Font size */
--fs-2xl: 2.7rem;
--fs-xl: 2rem;
--fs-lg: 1.5rem;
--fs-base: 1.1rem;
--fs-sm: 1rem;
--fs-xs: 0.9rem;
--fs-2xs: 0.75rem;

/* Font color */
--fc-dark: hsl(0, 0%, 5%);
--fc-global: hsl(0, 0%, 20%);
--fc-light: hsl(0, 0%, 40%);

/* Font weight */
--fw-bold: 800;
--fw-medium: 600;

/* Font family */
--f-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

/* Borders */
--c-border: hsl(241, 0%, 75%);
--br-separator: 1px solid var(--c-border);
--br-content: 2px solid var(--c-grey-light);
--br-content-style: dotted;

/* Border radius */
--br-r-base: 10px;

/* Box shadow */
--input-bs: 4px 1px 13px 4px rgba(0,0,0,0.12);
--input-bs-focus: 4px 1px 13px 4px rgba(0,0,0,0.17);

/* Heights */
--input-height: 50px;
--row-first-height: 230px;

/* Transitions */
--tr-base: 0.3s;

Overriting the styles. Example

const stylesNew = `
    --bg-box-content: red;
    --fs-base: 1.2rem;
`

Add styles with property stylesOverride

<WeatherApp stylesOverwrite={stylesNew}/>