第三方覆盖
支持第三方组件库
任何为元素能传递 className prop 的组件都可以用 styled 覆盖
如何覆盖 Arco 组件(React 组件)的样式?
export const TabWrapper = styled.div`
box-sizing: border-box;
min-height: 100%;
padding: 20px 0;
background-color: white;
追加? .arco-tabs-pane {
padding: 0 20px;
}
`;
export const LinkWithPopover =
styled(Typography.Text).attrs(({ style, ellipsis }) => ({
style: {
width: "200px",
margin: 0,
...style,
},
ellipsis: {
showTooltip: { type: "popover" },
...(typeof ellipsis === "object" ? ellipsis : {}),
},
})) <
{ style: any } >
`
&.arco-typography {
color: #1664ff;
font-size: 12px;
line-height: 20px;
background: none;
cursor: pointer;
:hover {
color: #4086ff;
}
}
`;