【问题标题】:Overriding style of antd Button using styled components is not working?使用样式化组件覆盖 antd Button 的样式不起作用?
【发布时间】:2019-09-01 20:27:36
【问题描述】:
import styled from 'styled-components';
import { Button } from 'antd';

const StyledButton = styled(Button)`
  height: 100%;
  border-width: 0px;
  &:hover {
    color: palevioletred;
    border-color: red;
  }
`;

export default StyledButton;

antd Button 组件的覆盖样式不起作用?

【问题讨论】:

    标签: reactjs antd styled-components


    【解决方案1】:

    我只是拿了你的代码,它正确地覆盖了 antd 的样式。可能还有其他原因

    【讨论】:

      猜你喜欢
      • 2020-10-16
      • 2018-06-27
      • 2019-09-28
      • 1970-01-01
      • 1970-01-01
      • 2021-08-24
      • 2021-11-01
      • 2017-12-02
      • 2021-08-02
      相关资源
      最近更新 更多