mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
fleshed out up to step 6
This commit is contained in:
21
step06/src/components/TodoHeader.tsx
Normal file
21
step06/src/components/TodoHeader.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
import React from "react";
|
||||
|
||||
export class TodoHeader extends React.Component<any, any> {
|
||||
render() {
|
||||
const { filter } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<h1>todos</h1>
|
||||
<input className="textfield" />
|
||||
<button className="button add">Add</button>
|
||||
<div className="filter">
|
||||
<button className={filter == "all" ? "active" : ""}>all</button>
|
||||
<button className={filter == "active" ? "active" : ""}>active</button>
|
||||
<button className={filter == "completed" ? "active" : ""}>
|
||||
completed
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user