how to target a styled components button using jest code example
Example 1: install styled components in Gatsby
npm install gatsby-plugin-styled-components styled-components babel-plugin-styled-components
Also requires this addition to gatsby-config.js
module.exports = {
plugins: [`gatsby-plugin-styled-components`],
}
Example 2: styled components attrs
export const TextInputElement = styled.TextInput.attrs(props => ({
placeholderTextColor: props.ColorPlaceholder,
}))`
font-size: 15px;
line-height: 18px;
color: '#000';
`;