Can u explain me how to use SC with custom attr name?
This code does not work and i dont understand why.
I expect to receive like this <div customAttrName="customAttrName"></div>
export const TagName = styled.div.attrs((props) => {
console.log("props", props);
return {
type: "anyType",
size: 25,
customAttrName: "customAttrName"
};
})`
padding: 4px 7px 2px 10px;
margin: 5px 6px 5px 0;
border-radius: 5px;
font-family: "MullerRegular", sans-serif;
`;
export default function App() {
return (
<div className="App">
<h1>Hello CodeSandbox</h1>
<TagName>Start editing to see some magic happen!</TagName>
</div>
);
}