@storybook/preset-ant-design
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Ant Design preset for Storybook

One-line Ant Design configuration for Storybook.

Basic usage

yarn add -D @storybook/preset-ant-design

Then add the following to .storybook/presets.js:

module.exports = ['@storybook/preset-ant-design'];

If used with preset-create-react-app, Make sure override the default file loader.

{
  "name": "@storybook/preset-create-react-app",
  "options": {
    "craOverrides": {
      "fileLoaderExcludes": ["less"]
    }
  }
}

Advanced usage

You can customize theme variable by passing modifyVars options into less loader in.storybook/presets.js, e.g.:

module.exports = [
  {
    name: '@storybook/preset-ant-design',
    options: {
      lessOptions: {
        modifyVars: {
          'primary-color': '#1DA57A',
          'border-radius-base': '2px',
        },
      },
    },
  },
];

Readme

Keywords

none

Package Sidebar

Install

npm i @storybook/preset-ant-design

Weekly Downloads

7,293

Version

0.0.2

License

MIT

Unpacked Size

3.34 kB

Total Files

5

Last publish

Collaborators

  • domyen
  • kasperpeulen
  • valentinpalkovic
  • jreinhold
  • kylegach
  • ndelangen
  • shilman
  • tmeasday
  • ghengeveld
  • winkervsbecks
  • yannbf