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

eye-design

v0.9.64

Published

点睛平台UI组件库

Downloads

597

Readme

点睛平台前端React组件库


本项目依赖 storybook 创建单一或者多个状态的组件 [storybook 学习][https://www.learnstorybook.com/react/zh-CN/get-started/]

开发说明

安装依赖

yarn install
yarn add [email protected] [email protected]

发布至npm

先安装npm和编译打包工具 babel webpack

运行下面的命令进行打包

npm run build

修改package.jsonversion 增加一个版本

发布至 npm

npm publish

在主库重新安装并使用

npm i --save eye-design

使用说明

import React, { Component } from 'react';
import {RadioGroup, Radio}  from './components/ui/RadioGroup';

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      valueSelected: 'apple'
    }
  }
  render() {
    return (
      <div className="App">
        <h1>点睛前端RadioGroup组件</h1>
          <h3>RadioGroup 和 Radio 组件</h3>
          <div className="demo-in">
            <RadioGroup name="fruit" valueSelected={this.state.valueSelected} onChange={(val) => this.handleChange(val)}>
              <Radio value="apple" text="Apple"/>
              <Radio value="orange" text="Orange"/>
              <Radio value="watermelon" text="Watermelon"/>
            </RadioGroup>
          </div>
      </div>
    )
  }
  handleChange(val) {
    this.setState({valueSelected: val})
  }
}
export default App;

目录结构

eye-design
├── README.md          # 项目说明文件
├── .storybook         # 项目`storybook`相关配置、`webpack` 配置文件
├── node_modules       # 模块依赖,在 `.gitignore` 文件中加入了忽略,请使用 `npm install` 或者 `yarn`
├── package.json       # 项目配置信息和依赖json文件
├── package-lock.json  # 模块依赖快照文件
├── yarn.lock          # 速度快,可靠,安全的依赖管理的
├── .gitignore         # `git` 忽略特殊文件
├── public             # 公共文件夹
├── test               # 单元测试
├── stories             # `storybook`的`demo`组件展示代码
└── src                # 项目文件
    └── compoments       # 项目公共组件
    └── widgets          # 项目公共组件
    └── web              # 项目组和 组件`example`
      └── about            # 开发团队介绍
    └── utils            # 项目可复用功能
    └── assets           # 项目资产文件
      └── css              # 项目公共样式文件
    └── other            # 其他杂项
    └── index.js         # 项目入口