Skip to content

Instantly share code, notes, and snippets.

@SarahElson
Created May 21, 2024 04:01
Show Gist options
  • Save SarahElson/bba176f16b896f5867927ece986df2f0 to your computer and use it in GitHub Desktop.
Save SarahElson/bba176f16b896f5867927ece986df2f0 to your computer and use it in GitHub Desktop.
How to Use CSS Modules With React Applications
import React from 'react'
import styles from './HeroText.module.css'
import Button from '../Button/Button'
export default function HeroText() {
return (
<div className={styles.half}>
<h1 className={styles.leading}>Next-Generation Mobile Apps and Cross Browser Testing Cloud</h1>
<div className={styles.buttoncontainer}>
<Button text={'Start free with Google'} type={'primary'} />
<Button text={'Start free with Email'} type={'secondary'} />
</div>
</div>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment