Answers for "mixin in styled components"

0

mixin in styled components

const textInput = props => `
  color: ${props.error ? color.white : color.base};
  background-color: ${props.error ? color.alert : color.white};
`;

export const Input = styled.input`
  ${textInput}
`;
Posted by: Guest on January-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language