Answers for "className={styles.header} gatsby not working with css modules?"

1

className={styles.header} gatsby not working with css modules?

// I had a problem of css modules not working in gatsby not working
// Here  is what I was getting wrong

import React from 'react';
import styles from '../styles/layout.module.css'; // I did this
import * as styles from '../styles/layout.module.css'; // Instaed of this

export default function Footer() {
  return (
    <footer className={styles.footer}>
      Logan
      <p>...your client-side frenemy</p>
    </footer>
  )
}
Posted by: Guest on March-30-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language