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

uxcore-steps

v2.2.1

Published

uxcore-steps component for uxcore.

Downloads

81

Readme


uxcore-steps Dependency Status devDependency Status

TL;DR

uxcore-steps ui component for react

setup develop environment

$ git clone https://github.com/uxcore/uxcore-steps
$ cd uxcore-steps
$ npm install
$ npm run start

Usage

import Steps, { Step } from 'uxcore-steps';

ReactDOM.render(
	<Steps current={0} type="bottom-desc">
		<Steps.Step key={0} title="第一步" />
		<Steps.Step key={1} title="第二步" />
		<Steps.Step key={2} title="第三步" />
	</Steps>, target)

demo

http://uxcore.github.io/uxcore/components/steps/

API

Props

Steps

| 配置项 | 说明 | 类型 | 可选值 | 默认值 | |---|---|---|---|---| |prefixCls | prefix class name | string | | kuma-step | |className | additional class name added to wrap | string | | | |current | 可选参数,指定当前处理正在执行状态的步骤,从0开始记数。在子Step元素中,可以通过status属性覆盖状态。 | number | 无 | 0| |direction | 可选参数,指定步骤条方向(目前支持水平和竖直两种方向,默认水平方向)。 | string | vertical | 无 | |maxDescriptionWidth | 可选参数,指定步骤的详细描述文字的最大宽度。 | number | 无 | 100 | |showIcon | 步骤节点是否显示图标或数字 | bool | true or false | true | |type | 步骤条类型 | string | default arrow-bar title-on-top long-desc or bottom-desc | default | |showDetail | 可选参数[direction=vertical或type=long-desc不生效],是否显示详情面板[step的children] | bool | true false | false | |currentDetail | 可选参数[direction=vertical或type=long-desc不生效],指定当前正在显示的详情面板,从0开始记数 | number | 0 ... | 0 | |onChange | 可选参数[仅仅在 showDetail 或节点为 editable 时生效],指定步骤icon点击事件回调,参数为被点击步骤对应数字 | func | | (v)=>{} |

Steps.Step

| 配置项 | 说明 | 类型 | 可选值 | 默认值 | |---|---|---|---|---| |status | 可选参数,指定状态。当不配置该属性时,会使用父Steps元素的current来自动指定状态。 | string | wait, process, finish, error | wait | |title | 必要参数,标题。 | string/jsx | 无 | 无 | |description | 可选参数,步骤的详情描述。 | string/jsx | 无 | 空 | |icon | 可选参数,步骤的Icon。如果传 string,则为自定义样式方式;如果传 jsx,请传 uxcore-icon。 | string/jsx | 无 | 空 | |editable | 可选参数,该步骤的内容是否可以返回编辑。 | boolean | true/false | false |

  • 在 React V16 之后,如果 icon 传入 jsx 并使用的是 uxcore-icon 时,请增加 usei 属性,否则 React 会抛出 The tag <icon> is unrecognized in this browser 的警告信息
  • 如果指定 editable 为 true,则该节点样式为可点击,使用需要配合传入 onChange 回调函数,回调函数将通过参数回传用户当前点击步骤的 key,可以通过 key 值来调整 current 或者需要显示的内容。