Answers for "styled-props npm"

4

styled componets npm

npm i styled-components
Posted by: Guest on August-14-2020
0

styled component with props

<Separator thin />
   
const Separator = styled.div`
  display: block;
  width: 100%;
  height: 1px;
  margin: ${props => props.thin? '7px auto 0':'10px auto'};
`;

export default Separator;
Posted by: Guest on August-04-2021

Browse Popular Code Answers by Language