【发布时间】:2022-11-19 11:04:39
【问题描述】:
如何在 React MUI 的警报操作中创建样式化按钮?它没有注册或看到我的 css 更改。我需要以某种方式传递参数吗?
反应:
const StyledButton = styled(Button)`
font-family: 'Source Sans Pro';
padding-bottom: 1px;
color: '#663C00';
background-color: 'transparent';
text-decoration: 'none';
&& {
font-family: 'Source Sans Pro';
padding-bottom: '1px';
color: '#663C00';
background-color: 'transparent';
text-decoration: 'none';
}
`;
HTML:
<Alert
severity="warning"
action={
<StyledButton href={getChargeURL()}>
【问题讨论】:
标签: reactjs material-ui