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

@gateweb/react-material-ui

v2.2.0

Published

React UI components for Gateweb

Downloads

251

Readme

GateWeb Material React UI

GateWeb Material React UI 是一個基於 Material-UI (MUI) 打造的UI元件庫,旨在提供一致且易於使用的UI元件,幫助開發者更高效地構建現代Web應用。我們的元件庫使用了 Material React Table 套件來實現高效和靈活的表格功能。

技術堆棧

系統要求

使用方式

安裝

npm install @gateweb/react-material-ui
# or
yarn add @gateweb/react-material-ui
# or
pnpm add @gateweb/react-material-ui

引入

import { Button } from '@gateweb/react-material-ui';

如何發布版本

手動發布

  1. 更新 package.json 內的版本號

    # e.g. 從 0.1.0 升級成 0.1.1
    {
        "name": "@gateweb/react-material-ui",
    -   "version": "0.1.0"
    +   "version": "0.1.1"
    }
  2. 安裝依賴、建置程式碼

    pnpm install
    pnpm build
  3. 登入 npm

    # 確保有 npm 帳號
    pnpm login
    # npm notice Log in on https://registry.npmjs.org/
    # Login at:
    # https://www.npmjs.com/login?next=/login/cli/390e514d-7aa5-4ee7-a13a-b17e6dd64518
    # Press ENTER to open in the browser...
  4. 發布到 npm

    pnpm publish --access public --no-git-checks
  5. 到 npm 頁面上確認是否有新版本發布成功

    @gateweb/react-material-ui

自動發布

  • 當有新的 commit push 到 main 分支時,GitHub Action 會自動執行發布流程。

  • 版本號的規則都是遵循 Semantic Versioning

注意事項

Mui-icons 問題

v1.2.0 時在 next.js 專案中使用包含引入 @mui/icons-material 的元件時,會遇到以下錯誤:

React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

根據相關的 issue,在引入 icon 時做了以下調整:

// 原本方式使用 default import
import CheckIcon from '@mui/icons-material/Check';

// 修改為使用 named import
import { Check as CheckIcon } from '@mui/icons-material';