tok-ui
v0.0.2
Published
the ui library from tok
Downloads
1
Readme
tok前端 react 组件库
安装
npm install tok-ui
yarn add tok-ui
按需引入
// .babelrc or babel-loader option
{
"plugins": [
["import", {
"libraryName": "tok-ui",
"libraryDirectory": "es",
"style": true
}]
]
}
主题配置
const styleVariables = {
'xy-primary-color': '#1890FF', // 全局主色
};
// sass-loader中:
{
loader: require.resolve('sass-loader'),
options: {
data: Object.keys(styleVariables)
.map(k => `$${k}: ${styleVariables[k]};`)
.join('\n')
}
使用
import { Upload } from 'tok-ui';
const App = () => {
return (
<Upload.Image
cropper={{
ratio: '4:3',
}}
/>
);
};