一个React UI Library, 使用简单
npm i -S react-iaux
import React from 'react';
import { Button } from 'react-iaux';
export default function() {
return (
<div className="dc-btn-line">
<Button onClick={() => console.log('Hello React')}>Get Started</Button>
</div>
);
}
- direct import
import Button from 'react-iaux/es/button';
- with
babel-import-plugin
module.exports = {
'plugins': [
[
'import',
{
'libraryName': 'react-iaux',
'libraryDirectory': 'es',
'style': true,
'camel2DashComponentName': false,
'customName': name => {
return `react-iaux/es/${[name[0].toLowerCase(), name.substr(1)].join('')}`;
},
},
],
}
The MIT License (MIT)