@deskpro/react-components

中文文档
1.4.10发布于 2022/07/24BSD-3-ClauseCommonJS近 30 天下载 2506

Deskpro React Components

原始使用文档
文档目录20 节
  1. Overview
  2. Components
  3. Common
  4. Forms
  5. Buttons
  6. Columns
  7. Tabs
  8. Cards
  9. Badges
  10. Utilities
  11. Props
  12. Numbers
  13. Strings
  14. Regexp
  15. Objects
  16. Dates
  17. DOM
  18. CSS
  19. Bindings
  20. License

@deskpro/react-components

A react-based set of components for building DeskPRO apps.

Build Status Coverage Status License npm version Storybook

Overview

A Storybook demo is available online at https://deskpro.github.io/react-components.

Components

  • Alert
    Renders a notification message.
  • Icon
    Renders an icon using the Font Awesome library.
  • Avatar
    Renders an avatar image.
  • Urgency
    Renders a message in a box which is colored to match an urgency level between 1 and 10.
  • Progress
    Renders a progress bar.
  • Stars
    Renders a group of star icons which represent a vote between 1 and 5.
  • Loader
    Renders an animated loader spinner.

Common

Forms

Buttons

Columns

  • Columns/Column
    A navigation column containing expandable drawers.
  • Columns/Drawer
    An expandable drawer within a navigation column.
  • Columns/Item
    Standard drawer item which may contain an icon and number.

Tabs

  • Tabs/Tabs
    Renders a group of links as tabs.

Cards

Badges

Utilities

  • newid
    Generates a unique id value.
  • noop
    Provides an empty function to use as a default callback.

Props

Numbers

Strings

Regexp

Objects

Dates

DOM

CSS

Bindings

License

The library is released under the BSD License. See LICENSE for more information.

版本与发布记录

@deskpro/react-components 共发布 96 个版本,首次发布于 2017/10/23;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.4.10latest2022/07/244 年前
1.4.92020/01/216 年前
1.4.82020/01/206 年前
1.4.72019/10/187 年前
1.4.62019/08/087 年前
1.4.52019/07/167 年前

其他发布通道:previous → 1.2.18。

关于 @deskpro/react-components 的常见问题

@deskpro/react-components 是什么?

Deskpro React Components

如何安装 @deskpro/react-components?

在项目目录运行 npm install @deskpro/react-components,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(^15.6.2 || ^16.0.0-alpha)、moment(>=2.20.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@deskpro/react-components 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/deskpro__react-components 是否存在。

@deskpro/react-components 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@deskpro/react-components 可以商用吗?

@deskpro/react-components 使用 BSD-3-Clause 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。另外不得用原作者名义为衍生产品背书。以上为概括,不构成法律意见,请以许可原文为准。

@deskpro/react-components 的下载量有多少?

根据 npm 官方下载统计,@deskpro/react-components 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,506 次,日均约 84 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@deskpro/react-components 还在维护吗?

最新版本 1.4.10 发布于 2022/07/24(4 年前);至今共发布 96 个版本,其中过去 12 个月发布了 0 个;首次发布于 2017/10/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。