2.2.0 • Published 5 years ago
gatsby-plugin-antd v2.2.0
gatsby-plugin-antd
Use Ant Design with Gatsby
Install
npm install antd gatsby-plugin-antd --save
How to use
- Include the plugin in your
gatsby-config.js
file.
// in gatsby-config.js
plugins: [
'gatsby-plugin-antd'
]
// or if you want to use less
plugins: [
{
resolve: 'gatsby-plugin-antd',
options: {
style: true
}
}
]
note: if you are using less then you need to install less
- In your component(s) include the Ant Design component using dynamic imports as suggested here https://ant.design/docs/react/getting-started#Import-on-Demand
// in your component
import { Button } from 'antd'
export default () => <Button type="primary">Primary</Button>
- It will pull in the component and the relevant css file using babel-plugin-import
2.2.0
5 years ago
2.1.0
6 years ago
2.0.4
6 years ago
2.0.2
7 years ago
2.0.1
7 years ago
1.0.15
7 years ago
2.0.0
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago