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

@btcchina-components/components

v0.15.3

Published

btcchina components

Downloads

25

Readme

@btcchina-components(BTCChina 公共组件库)

NPM version node version

Background

上线项目越来越多,每个项目有相同的组件在独立维护,造成了维护工作的重复性。

Technology

https://github.com/storybooks/react-cdk

Use

Step 1

npm install @btcchina-components/components

Step2

import {component} from '@btcchina-components/components/dist/components/{component}'
// example: import Header from '@btcchina-components/components/dist/components/Header'

Step3

按照组件具体使用方式在项目中进行使用

Components

Header

props:

  • lang: 当前用户使用的语言('zh' or 'en')
  • env: 当前项目所在的环境 ('development', 'staging' or 'production')
  • email: 当前登录用户的用户名 ('[email protected]' or '')
  • logout: 用户点击登出函数,具体登出操作需在具体项目中实现
  • hideLogin: 是否显示登录按钮和登录状态,默认显示,若不显示传入true

注: email为空时为未登录状态,显示登录注册按钮,否则显示用户名和登出按钮

Functions

  • 样式的实现
  • 响应式的实现
  • 点击登录和注册会分别跳到主页和注册页,用户登录或者注册成功后将会返回对应的页面

Footer

props:

  • lang: 当前用户使用的语言('zh' or 'en')
  • env: 当前项目所在的环境 ('development', 'staging' or 'production')
  • changeLang('zh' or 'en'): 用户点击切换语言时执行的操作,具体切换语言操作需在项目中实现

Functions

  • 样式的实现
  • 响应式的实现

ContactUs

props

  • lang: 当前用户使用的语言('zh' or 'en')

Functions

  • 页面侧边联系方式组件,实现动态加逸创云客服三方库

Example

import React from 'react';
import ReactDOM from 'react-dom';
import Header from '@btcchina-components/components/dist/components/Header'

ReactDOM.render(
    <Header
        env="development"
        lang="zh"
        email="[email protected]"
        logout={() => console.log('logout')}
    />
)