Answers for "styled componets add attribute"

0

styled componets add attribute

/* just add .attrs({}) */

/* Let's say we have a loading button that always needs to be disabled */

const CustomLoadingButton = styled.div.attrs(disabled: true)`
  background-color #ffc000;
  color: black;
  padding: 8px;
`
Posted by: Guest on October-18-2021

Code answers related to "styled componets add attribute"

Code answers related to "Javascript"

Browse Popular Code Answers by Language