Chap04 -> Styling components with CSS modules

Chap04
Yiqing Zhu 2022-03-26 17:56:51 +11:00
parent 9830fb1af2
commit e90cc6b191
4 changed files with 4 additions and 4 deletions

View File

@ -1,11 +1,11 @@
import React from 'react';
import { Header } from './Header';
import './App.css';
import style from './App.module.css';
import { HomePage } from './HomePage';
function App() {
return (
<div className="container">
<div className={style.container}>
<Header />
<HomePage />
</div>

View File

@ -1,6 +1,6 @@
import React from 'react';
import { UserIcon } from './Icons';
import './Header.css';
import style from './Header.module.css';
export const Header = () => {
const handleSearchInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
@ -8,7 +8,7 @@ export const Header = () => {
};
return (
<div className="container">
<div className={style.container}>
<a href="./">Q & A</a>
<input
type="text"