0.3.77 • Published 3 years ago

@feat/feat-ui v0.3.77

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Feat UI Framework

开始使用

访问 storybook 可以查看具体示例:storybook;

分模块引用

使用 avatar 时,注意 defaultAvatar.svg 的引入

参考代码:

module: {
  rules: [
    {
      test: /avatar?\/.*?\.svg$/,
      issuer: /\.js$/,
      use: [
        {
          loader: 'file-loader',
          options: {
            name: 'img/[name].[ext]',
          },
        },
      ],
    },
    {
        test: (path) => !/avatar?\/.*?\.svg$/.test(path),
        use: [
          {
            loader: 'svg-inline-loader',
            options: {
              removingTagAttrs: ['id'],
            },
          },
        ],
      },
  ];
}
import Button from '@feat/feat-ui/lib/button';
import '@feat/feat-ui/lib/button/style/index.css';

const Example = (props) => <Button type='primary'>Demo</Button>;

全部引用

import { Button } from '@feat/feat-ui';
import '@feat/feat-ui/dist/feat-ui.css';

const Example = (props) => <Button type='primary'>Demo</Button>;

开发配置

  1. 复制 devConfig.js.exmpaledevConfig.js
cp devConfig.js.exmpale devConfig.js
  1. 修改HOST

组件目录结构

|____demo
| |____basic.story.js
| |____index.stories.js
|____style
|____index.js
|____index.md