Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created May 22, 2024 13:25
Show Gist options
  • Save SarahElson/7c0355d23da54e2d916a7b9be206bea2 to your computer and use it in GitHub Desktop.
Save SarahElson/7c0355d23da54e2d916a7b9be206bea2 to your computer and use it in GitHub Desktop.
How to Use CSS Modules With React Applications
import NavLinks from '../NavLinks/NavLinks'
import Button from '../Button/Button'
import styles from './Navbar.module.css'
export default function Navbar() {
return (
<div className={styles.navbar}>
<div>
<p className={styles.logo}>LambdaTest</p>
</div>
<NavLinks />
<div className={styles.buttons}>
<Button text='Book a Demo' type='secondary' />
<Button text='Get Started Free' type='primary' />
</div>
</div>
)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment