Chap04 -> Styling components with CSS -> Styling the Header component
parent
8a19835b45
commit
58c82bb334
|
@ -0,0 +1,13 @@
|
||||||
|
.container {
|
||||||
|
position: fixed;
|
||||||
|
box-sizing: border-box;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 20px;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid #e3e2e2;
|
||||||
|
box-shadow: 0 3px 7px 0 rgba(110, 112, 114, 0.21);
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { UserIcon } from './Icons';
|
import { UserIcon } from './Icons';
|
||||||
|
import './Header.css';
|
||||||
|
|
||||||
export const Header = () => {
|
export const Header = () => {
|
||||||
const handleSearchInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
const handleSearchInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
@ -7,7 +8,7 @@ export const Header = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className="container">
|
||||||
<a href="./">Q & A</a>
|
<a href="./">Q & A</a>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
|
Loading…
Reference in New Issue