Socket
Socket
Sign inDemoInstall

react-icecream

Package Overview
Dependencies
55
Maintainers
6
Versions
174
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-icecream

Qiniu Icecream Design for React.


Version published
Weekly downloads
1.4K
increased by40.43%
Maintainers
6
Install size
24.9 MB
Created
Weekly downloads
 

Readme

Source

React-icecream

Qiniu Icecream Design for React.

Permanent-Online-Website

http://icecream-v2.jfcs-k8s-qa1.qiniu.io/

Install

yarn add react-icecream

Usage

从根结点导出

import { Button } from 'react-icecream'

function App() {
  return (
    <Button>content</Button>
  )
}

Principles

  • 不使用改变组件内部布局的 style
  • 不继承原生组件的 props,改为用 rootHtmlProps 的方式实现
  • rootHtmlProps 的 className、style、onChange、onClick 等等需要被 merge,而不是替换
  • 大部分组件都是通过间距来控制高度的,因此和设计稿有 2px 误差,设计稿必须把边框设计为内边框
  • 没有固定的公式计算 line-height,可以用 setIcecreamFontSize 设置字号的同时帮助设置行高

Develop

Build

yarn build

Test

yarn test

Start Dumi

yarn dev

FAQs

Last updated on 27 Mar 2024

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