Socket
Socket
Sign inDemoInstall

shopee-ui-react

Package Overview
Dependencies
71
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

shopee-ui-react

A set of UI components written with React.


Version published
Maintainers
1
Weekly downloads
1

Weekly downloads

Readme

Source

EDS React

A set of UI components written with React.

🔩 Install

npm install shopee-ui-react

🔰 Quick Start

// 全局引入
import * as ShopeeUI from 'shopee-ui-react/dist/shopee-ui-react.min.js';
import 'shopee-ui-react/lib/theme-default/index.css';
// 类型引入
import { ButtonProps } from 'shopee-ui-react';
or
import { ButtonProps } from 'shopee-ui-react/es/components/button/types';
// 按需加载
import { Button } from 'shopee-ui-react';
import 'shopee-ui-react/es/theme-default/components/button/index.css';
// EDS默认支持基于 ES modules 的 tree shaking,对于 js 部分,直接引入 import { Button } from 'shopee-ui-react' 就会有按需加载的效果。

也可以使用 babel-plugin-import 来实现按需加载

// .babelrc.js
module.exports = {
  plugins: [
    [
      'import',
      {
        libraryName: 'shopee-ui-react',
        libraryDirectory: 'es/components',
        customStyleName: (component) => `shopee-ui-react/es/theme-default/components/${component}/index.css`
      }
    ]
  ]
}
// babel-plugin-import 会帮助你加载 JS 和 CSS
import { Button } from 'shopee-ui-react';
      ↓ ↓ ↓ ↓ ↓ ↓ ↓
import Button from 'shopee-ui-react/es/components/button';
import 'shopee-ui-react/es/theme-default/components/button/index.css'

🤝 Contributing

Read our contributing guide.

Keywords

FAQs

Last updated on 09 Nov 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc