Answers
- The wrapper CSS class could clash with other classes. To reduce this risk, the class name can be manually scoped to the component:
<div className="card-wrapper"></div>
- The CSS won’t clash because CSS modules will scope the class names to each component.
- The wrong class name is referenced in the component – it should be
wrap
rather thanwrapper
:import styles from './styles3.module.css';
function ComponentThree() {
return <div className={styles.wrap}>
</div>
}
- The
css
prop on the button could be as follows:<button
css={css`
border-radius: ${kind === "rounded" ? "4px" : "0px"};
`}
>
...
</button>
- The style can be adjusted as follows to include the hover style:
<button className="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
...
</button
Logo
...