Socket
Socket
Sign inDemoInstall

@storybook/preset-ant-design

Package Overview
Dependencies
5
Maintainers
23
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @storybook/preset-ant-design

Ant Design preset for Storybook


Version published
Weekly downloads
7.5K
increased by12.82%
Maintainers
23
Install size
9.38 MB
Created
Weekly downloads
 

Readme

Source

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',
        },
      },
    },
  },
];

FAQs

Last updated on 15 Feb 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc