|
|
|
|
|
by mxstbr
3489 days ago
|
|
You can choose to style styled components any way you want too! You can pass in class names, inline styles, whatever you want just works. No need to be aware of styled-components from the user side at all. Imagine Button being a styled component, all of the usual methods work perfectly fine: import Button from 'antd';
<Button className="my-global-classname" />
<Button style={{ color: 'red' }} />
You say "just" apply some global color overrides, but to "just" apply some global color overrides you need to use webpack (using another bundler? Sorry, antd is not for you) and use atool-build or have to configure webpack to work the way they need it to.Or you create a custom less file, but that means you'll load all the styling for all components even though you really only wanted to use e.g. the Button. That's not really "just" overriding a global color, is it? ;-) I'm not saying this is a trivial change at all by the way, I understand the cost of it since I'm doing it for ElementalUI. I don't know if the antd maitainers will consider it worth it, that's another discussion. |
|