Notes: From AntD Package Overview - HelpfulHuman/ant-design GitHub Wiki

Work on Components*

  • In testing out more complex components (the provided Carousel component), it was discovered that simply changing the prefix className, and providing custom styles was not enough to get the expected result. This was due to the existence of elements that still possessed the ant- prefix that were ignored by the prop, thus they didn’t get styled. Or, the provided classname was applied following the default classname prefix (which can easily be ignored by not importing the default stylesheets). Likely we will want to modify components like this to have full coverage of applied styles.

  • Alternatively, we could just write overriding styles and take into account the remaining prefixes, and abstract the given component away.

  • We may (at some point) need to modify existing components in order to meet cases not provided for. Though this can probably wait until the need arises, but this is another justification for why we want our own fork.

  • In our fork, we should consider removing any unneeded or undesired dependencies/components. These could be dependencies that add extra bloat to the package, but are not necessary to accomplish the goal of component elements/kit. Or (and this will need testing and usage) in cases where any components are lacking in stability or usefulness.

Importing Components

I noted that using the import statement…​

import { Button } from 'antd';

…​results in importing all components.

This can apparently be avoided by using [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) which we can use to convert the above statement to import Button from 'antd/lib/button';

  • We will either need to use this package, provided it will allow us to explicitly import multiple components at a time; or, we should alter our fork to properly export the components suited to our expectations.

⚠️ **GitHub.com Fallback** ⚠️