conditionally changing styled components based on props
const Text = styled.p`
color: ${(props) => (props.red ? 'red' : 'blue')};
`
conditionally changing styled components based on props
const Text = styled.p`
color: ${(props) => (props.red ? 'red' : 'blue')};
`
how to use in styled components the same settings of another element
import styled, { css } from ‘styled-components’;
const baseInputStyles = css`
padding: 0.5em;
`;
const StyledA = styled.a`
${baseInputStyles}
`;
const StyledButton = styled.button`
${baseInputStyles}
/* make changes as needed*/
`;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us