@2600hz/sds-react-components 中文文档教程

发布于 3年前 浏览 25 项目主页 更新于 3年前

React Native Components

@2600hz/sds-反应组件

包含用于网络和桌面开发的所有可共享组件的库。

[![NPM 版本](https://img.shields.io/npm/v/@2600hz/sds-react-components?style=flat-square)](https://img.shields.io/npm/ v/@2600hz/sds-react-components?style=flat-square) [![代码风格:更漂亮](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)


2600Hz - Commio

SDS React Components Library

NPM 包

Installation

这个项目需要 Node.js v14+ 运行。

使用 .nvmrc 文件有助于规范所有维护者使用的节点版本。 如果您需要使用此文件中指定的版本,请运行这些命令。

nvm use
nvm install

使用包管理器 yarn v1+ 安装依赖项和 devDependencies。

yarn install
yarn

Usage

安装

yarn add @2600hz/sds-react-components

现在在你的组件中

import { Button, Telicon, ... } from "@2600hz/sds-react-components";

// ...

<Button type='Primary' icon='user-admin-plus'>
  Add User
</Button>
// ...
<Telicon name='mic-slash' className='Icon' />

构建项目

yarn build

运行项目

yarn storybook

Telicon

每当一个新图标被添加到 Telicon 时,我们从 npm 获取新版本,然后更新 SvgTelicon 组件。 (这是避免 CORS 与 Safari 和 IOS 设备冲突所必需的)

yarn upgrade @2600hz/sds-telicon --latest

yarn run telicon

Utilities

使用 PrettierEslint

yarn run prettify

Needed packages

如果您的应用程序中尚未安装它们,yarn 将安装以下可用性所需的软件包。 这些包作为 peerDependencies 添加,

Tech Stack

Contributing

欢迎拉取请求。 对于重大更改,请先打开一个问题来讨论您想要更改的内容。

承诺 提交必须遵循常规提交格式 确保您的消息看起来像以下示例

feat: Adding new table component
fix: Table component not being exported correctly
fix!: Drop support for Typescript

请注意,最后一个将生成主要提交。 它与添加重大更改页脚具有相同的结果

按照Semantic Versioning 2.0.0 更新项目版本。

Release-It 将负责版本控制,您只需提供正确的类型即可提交:

  • fix - to indicate a bug fix (PATCH) ex . v0.0.1
  • feat - to indicate a new feature (MINOR) ex. v0.1.0
  • chore - for updates that do not require a version bump (.gitignore, comments, etc.)
  • docs - for updates to the documentation
  • BREAKING CHANGE - regardless of type, indicates a Major release (MAJOR) ex. v1.0.0

访问 常规提交 获取更多示例。

License

ISC

React Native Components

@2600hz/sds-react-components

Library that contains all sharable components for web and desktop development.

[![NPM version](https://img.shields.io/npm/v/@2600hz/sds-react-components?style=flat-square)](https://img.shields.io/npm/v/@2600hz/sds-react-components?style=flat-square) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)


2600Hz - Commio

SDS React Components Library

NPM package

Installation

This project requires Node.js v14+ to run.

Using .nvmrc file helps to normalize node version used by all maintainers. If you are required to use version specified in this file, run these commands.

nvm use
nvm install

Use the package manager yarn v1+ to install dependencies and devDependencies.

yarn install
yarn

Usage

Installation

yarn add @2600hz/sds-react-components

Now in your components

import { Button, Telicon, ... } from "@2600hz/sds-react-components";

// ...

<Button type='Primary' icon='user-admin-plus'>
  Add User
</Button>
// ...
<Telicon name='mic-slash' className='Icon' />

Build project

yarn build

Run project

yarn storybook

Telicon

Whenever a new icon is added to Telicon, we get the new version from npm, then update SvgTelicon component. (This is necessary to avoid CORS conflicts with Safari and IOS devices)

yarn upgrade @2600hz/sds-telicon --latest

yarn run telicon

Utilities

Format code using Prettier and Eslint

yarn run prettify

Needed packages

If you don't already have them on your app, yarn will install the following packages needed for usability. These packages are added as peerDependencies

Tech Stack

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Commits Commits must follow conventional commit format Make sure your messages look like the following examples

feat: Adding new table component
fix: Table component not being exported correctly
fix!: Drop support for Typescript

Note that the last one will generate a Major commit. It has the same result as adding a breaking change footer

Follow Semantic Versioning 2.0.0 to update project version.

Release-It will take care of versioning, you just have to give the correct type to commit:

  • fix - to indicate a bug fix (PATCH) ex . v0.0.1
  • feat - to indicate a new feature (MINOR) ex. v0.1.0
  • chore - for updates that do not require a version bump (.gitignore, comments, etc.)
  • docs - for updates to the documentation
  • BREAKING CHANGE - regardless of type, indicates a Major release (MAJOR) ex. v1.0.0

Visit Conventional Commits for more examples.

License

ISC

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文