Complete the code to import the styled function from the styled-components library.
import [1] from 'styled-components';
The styled function is the correct import to create styled components in CSS-in-JS using styled-components.
Complete the code to create a styled button component with a background color of blue.
const Button = styled.button`background-color: [1];`;The background color should be set to 'blue' as requested.
Fix the error in the styled component syntax by completing the missing template literal marker.
const Container = styled.div[1]background: white; padding: 1rem;`;
The styled component syntax requires a backtick ` to start the template literal.
Fill both blanks to correctly apply dynamic props for background and font color in a styled component.
const Text = styled.p`background: [1]; color: [2];`;
The background uses props.bgColor and the font color uses props.fontColor to dynamically style the component.
Fill all three blanks to create a styled component that changes color on hover using props.
const Link = styled.a`color: [1]; text-decoration: none; &:hover { color: [2]; cursor: [3]; }`;
The link color uses props.color, changes to props.hoverColor on hover, and the cursor changes to 'pointer' to indicate it's clickable.