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

rcs

v0.0.1

Published

Useful react components using styled-components.

Downloads

3

Readme

rc-styled

rc-styled

This package contains the most powerful components using react with styled components.

Table of Contents

Usage

npm i --save rc-styled styled-components

Encapsulate your app into ThemeProvider

Maintainer usage

You should have yalc installed globally to avoid npm link issues

npm i -g yalc

npm run dev

Why using svg over icon font

Easy to:

Vscode Snippets

  • CSS.json
{
  "Theme": {
    "prefix": "rcst",
    "body": ["${({theme})=> theme.$1}"]
  },
  "Theme  text variant": {
    "prefix": "rcstv",
    "body": ["${({theme})=> theme.typography.buildTextVariant($1)}"]
  },
  "Theme text variant customized": {
    "prefix": "rcstvc",
    "body": [
      "${({theme})=> theme.typography.buildTextVariant({",
      "...theme.typography.${1:variant},",
      "fontSize: theme.typography.$2,",
      "color: theme.palette.$3,",
      "fontWeight: theme.typography.fontWeight$4,",
      "textTransform: theme.typography.$5,",
      "fontFamily: theme.typography.$6,",
      "lineHeight: theme.typography.$7,",
      "})}"
    ]
  },
  "Destructured styled theme": {
    "prefix": "dst",
    "body": ["${({theme, ${2:prop}})=> theme.${1:property}};"],
    "description": "Destructured styled theme"
  },
  "Destructured styled theme palette": {
    "prefix": "dstp",
    "body": ["${({theme: { palette }, ${2:prop}})=> palette.${1:property}};"],
    "description": "Destructured styled theme palette"
  },
  "Destructured styled theme typography": {
    "prefix": "dstt",
    "body": [
      "${({theme: { typography }, ${2:prop}})=> typography.${1:property}};"
    ],
    "description": "Destructured styled theme typography"
  },
  "Destructured styled theme mixin": {
    "prefix": "dstm",
    "body": ["${({theme: { mixin }, ${2:prop}})=> mixin.${1:property}};"],
    "description": "Destructured styled theme mixin"
  },
  "Destructured styled theme mixin media": {
    "prefix": "dstmm",
    "body": [
      "${({theme: { mixin: { media } }, ${2:prop}})=> media.${1:property}};"
    ],
    "description": "Destructured styled theme mixin media"
  }
}
  • Javascript.json
{
  "Prints static PropTypes": {
    "prefix": "stprop",
    "body": ["static propTypes={$1}"],
    "description": "PropTypes static of react class"
  },

  "Theme": {
    "prefix": "rcst",
    "body": ["${({theme})=> theme.$1}"]
  },
  "Theme  text variant": {
    "prefix": "rcstv",
    "body": ["${({theme})=> theme.typography.buildTextVariant($1)}"]
  },
  "Theme text variant customized": {
    "prefix": "rcstvc",
    "body": [
      "${({theme})=> theme.typography.buildTextVariant({",
      "...theme.typography.${1:variant},",
      "fontSize: theme.typography.$2,",
      "color: theme.palette.$3,",
      "fontWeight: theme.typography.fontWeight$4,",
      "textTransform: theme.typography.$5,",
      "fontFamily: theme.typography.$6,",
      "lineHeight: theme.typography.$7,",
      "})}"
    ]
  },
  "Story simple with Sample": {
    "prefix": "stsimple",
    "body": [
      "import React from 'react'",
      "import { story } from 'stories'",
      "import { $1 } from 'rc'",
      "",
      "story('$1').add('Sample', () => <$1></$1>)"
    ]
  },
  "Text knob storybook": {
    "prefix": "sttext",
    "body": ["${1:proptype}={text('${1:proptype}')}"],
    "description": "Facilititates knobs text."
  },
  "Text with defaultknob storybook": {
    "prefix": "stdtext",
    "body": ["${1:proptype}={text('${1:proptype}', '${2:defaultValue}')}"],
    "description": "Facilititates knobs text with default value."
  },
  "Array knob storybook": {
    "prefix": "starray",
    "body": ["${1:proptype}={array('${1:proptype}', [${2:defaultValue}])}"],
    "description": "Facilititates knobs array."
  },
  "Boolean knob storybook": {
    "prefix": "stboolean",
    "body": ["${1:proptype}={boolean('${1:proptype}', ${2:option1})}"],
    "description": "Facilititates knobs boolean."
  },
  "Select knob storybook": {
    "prefix": "stselect",
    "body": [
      "${1:proptype}={select('${1:proptype}', {${2:option1}: '${2:option1}'})}"
    ],
    "description": "Facilititates knobs select."
  },
  "Number knob storybook": {
    "prefix": "stnumber",
    "body": ["${1:proptype}={number('${1:proptype}', ${2:defaultValue})}"],
    "description": "Facilititates knobs numbers."
  },
  "Object knob storybook": {
    "prefix": "stobject",
    "body": [
      "${1:proptype}={object('${1:proptype}', {${2:option1}: '${2:option1}'})}"
    ],
    "description": "Facilititates knobs object."
  },
  "Radio knob storybook": {
    "prefix": "stradios",
    "body": [
      "${1:proptype}={radios('${1:proptype}', {${2:option1}: '${2:option1}', ${3:option1}: '${3:option1}'})}"
    ],
    "description": "Facilititates knobs radios."
  },
  "Files knob storybook": {
    "prefix": "stfiles",
    "body": [
      "${1:proptype}={files('${1:proptype}', accept, [${2:defaultValue}])}"
    ],
    "description": "Facilititates knobs files."
  },
  "Date knob storybook": {
    "prefix": "stdate",
    "body": ["${1:proptype}={date('${1:proptype}')}"],
    "description": "Facilititates knobs date."
  },
  "Date default knob storybook": {
    "prefix": "stddate",
    "body": [
      "${1:proptype}={date('${1:proptype}', new Date(${2:year}, ${3:month}, ${4:day}))}"
    ],
    "description": "Facilititates knobs date."
  },
  "Action default knob storybook": {
    "prefix": "staction",
    "body": ["${1:proptype}={action('${1:proptype}')}"],
    "description": "Facilititates addon actions."
  },
  "JS header comment": {
    "prefix": "hc",
    "body": [
      "/****************************************\n* ${1:header title}\n*/"
    ],
    "description": "Facilititates addon actions."
  },
  "JS header comment with console log green": {
    "prefix": "hcwlg",
    "body": [
      "/****************************************",
      " *  ${2:Section number}.${1:header title}.",
      "*/",
      "console.log('%c ${2:Section number}.${1:header title}', 'font-size: 16px; background: #222; color: #bada55')\n"
    ],
    "description": "JS header comment with console log green"
  },
  "JS sub-header comment with console log green": {
    "prefix": "shcwlg",
    "body": [
      " console.log(",
      "'%c ${1:sub-header}',",
      "'background: rgb(241, 250, 114); color: #000')"
    ],
    "description": "JS sub-header  comment with console log green"
  }
}