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

winner-podium

v1.0.0

Published

This package exports the utility to display the winners podium with 1st, 2nd and 3rd rank

Downloads

7

Readme

Installation

npm install winner-podium

Usage

import { WinnersPodium } from "winner-podium";

<WinnersPodium
  options={{
    container: {
      style: {
        borderRadius: "1rem",
        boxShadow: "rgba(0, 0, 0, 0.35) 0px 5px 15px",
      },
      className: "",
    },
    podiumHeight: 70,
    podiumWidth: 200,
    backgroundColor: "rgb(2 193 189)",
    is3D: true,
    topViewHeight: 30,
    header: <h1>Weekly Star Performers</h1>,
    footer: (
      <div>
        <div>
          <b>Rank 1:</b> Name-1
        </div>
        <div>
          <b>Rank 2:</b> Name-2
        </div>
        <div>
          <b>Rank 3:</b> Name-3
        </div>
      </div>
    ),
    winners: {
      rank1: (
        <img
          src="./man.png"
          style={{
            height: 100,
            width: 100,
            objectFit: "cover",
          }}
        />
      ),
      rank2: (
        <img
          src="./man.png"
          style={{
            height: 100,
            width: 100,
            objectFit: "cover",
          }}
        />
      ),
      rank3: (
        <img
          src="./man.png"
          style={{
            height: 100,
            width: 100,
            objectFit: "cover",
          }}
        />
      ),
    },
  }}
/>;

Preview

Hints: Preview image

2D: Preview image

3D: Preview image

Options

You can pass the following options to WinnersPodium:

| Parameter | Type | Default | Description | | --------------- | -------------------------------------------------------------------- | -------------- | --------------------------------------------------- | | container | object { style: object; className: string } | | Provide style or className to the podium | | podiumHeight | number | 70 | height of the smallest(rank-3) podium | | podiumWidth | number | 100 | width of each rank podium | | backgroundColor | string | rgb(2 193 189) | color of the podium. [Note: Add colors in rgb only] | | is3D | boolean | false | Display the podium in 2D | | topViewHeight | number | 30 | height of top of the stand in 3D view | | header | JSX.Element | | Element to display at the top | | footer | JSX.Element | | Element to display at the bottom | | winners | object { rank1: JSX.Element; rank2: JSX.Element; rank3:JSX.Element } | | Winner's Details to show on the podium |

Sample config using all options

{
  container: {
    style: {
      color: "white"
    },
    className: "winners-podium-container",
  },
  podiumHeight: 70,
  podiumWidth: 200,
  backgroundColor: "rgb(2 193 189)",
  is3D: true,
  topViewHeight: 30,
  header: <header>Header</header>,
  footer: <footer>Footer</footer>,
  winners: {
    rank1: <h4>Name-1</h4>,
    rank2: <h4>Name-2</h4>,
    rank3: <h4>Name-3</h4>,
  },
}

Author

Find me on Linkedin: https://www.linkedin.com/in/sushma-goswami-8550bb146/

License

winner-podium is available under the MIT license.