Giter VIP home page Giter VIP logo

zarm's Introduction

Zarm

Build Status Coverage Status npm package NPM downloads JS gzip size CSS gzip size

众安科技移动端UI组件库,基于React、React-Native。

Version 版本

  • 稳定版:npm package
  • 开发版:npm package

Install 安装

使用npm安装:

npm install zarm --save

或者通过cdn引入umd模块:

<link rel="stylesheet" href="https://unpkg.com/zarm@latest/dist/zarm.min.css">
<script type="text/javascript" src="https://unpkg.com/zarm@latest/dist/zarm.min.js"></script>

Usage 使用

全组件引入

import { Button, Cell } from 'zarm';
import 'zarm/dist/zarm.min.css';

按需加载

  • 方法一(推荐)

使用 babel-plugin-import 自动加载Sass文件

  // .babelrc or babel-loader option
  {
    "plugins": [
      ['import', {
        libraryName: 'zarm',
        style: true,
      }],
    ]
  }
import { Button, Cell } from 'zarm';
  • 方法二:
import Button from 'zarm/lib/Button';
import 'zarm/lib/Button/style';

定制主题

通过覆盖Sass变量定义达到定制主题的效果

@import "~zarm/lib/style/index.scss";  // 引入官方提供的Sass基础样式文件
@import "your-theme-file.scss";  // 用于覆盖上面定义的变量
@import "~zarm/lib/style/components.scss";  // 引入官方提供的组件样式文件

your-theme-file.scss 示例如下:

$theme-primary: #108ee9;

变量名可参考 default.scss

注意:这种方式已经载入了所有组件的样式,不需要也无法和按需加载插件 babel-plugin-importstyle 属性一起使用。

Changelog 更新日志

CHANGELOG.md

License

MIT

zarm's People

Contributors

jeromelin avatar edison-hm avatar sylvanasgone avatar newraina avatar sambiggod avatar lduoduo avatar zhiyingzzhou avatar hzzheng avatar thyiad avatar struggle-lulu avatar hezhirong avatar cheng007 avatar chrishchen avatar whatwewant avatar sanheng avatar lsert avatar sscassie avatar jinasonlin avatar xiaoshuangli avatar qingshuijiandou avatar

Watchers

Seeker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.