New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@race-ui/components

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@race-ui/components

react component

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

@race-ui/components 说明文档

react 基础组件库。 具体细节请查看 examples

安装

npm install @race-ui/components --save

组件引入

import { Button } from '@race-ui/components';

// 全局引入组件库所有样式
import '@race-ui/components/assets/index.css';

样式引入

(1)全局引入组件库所有样式(推荐)

import '@race-ui/components/assets/index.css';

(2)按需引入组件库样式

手动添加

import '@race-ui/components/esm/button/style/index.css';

webpack plugin 配置(选择按需加载推荐此种方式)

npm install babel-plugin-import@1.13.3 --save-dev

// babel config plugin
[
  'import', 
    { 
      libraryName: '@race-ui/components',
      libraryDirectory: 'esm',
      style: true
    }, 
  '@race-ui/components'
]

注意

该React Component公共库样式比较简陋,在实际应用中,需要再次封装成项目需要的UI,使用成本比较高。

当前市面上公共库(antd, element-ui等)都是带有完整样式的,但是在实际应用到项目时(除一些开发人员可以随意发挥的项目), 会重置掉几乎所有样式,徒增代码量和维护成本。

FAQs

Package last updated on 30 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts