Convert ToolBar to Typescript
This commit is contained in:
@@ -1,9 +1,20 @@
|
|||||||
import styles from "./ToolBar.module.css"
|
import styles from "./ToolBar.module.css"
|
||||||
import CreateEventBtn from "./tools/CreateEventBtn/CreateEventBtn.jsx";
|
import CreateEventBtn from "./tools/CreateEventBtn/CreateEventBtn";
|
||||||
import SearchBtn from "./tools/SearchBtn";
|
import SearchBtn from "./tools/SearchBtn";
|
||||||
import FilterBtn from "./tools/FilterBtn";
|
import FilterBtn from "./tools/FilterBtn";
|
||||||
|
|
||||||
function ToolBar({setFilters, filters, showCreate = true}) {
|
interface Filters {
|
||||||
|
alphabetical: "asc" | "desc";
|
||||||
|
yearOrder: "asc" | "desc";
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ToolBarProps {
|
||||||
|
setFilters: React.Dispatch<React.SetStateAction<Filters>>;
|
||||||
|
filters: Filters;
|
||||||
|
showCreate?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ToolBar({ setFilters, filters, showCreate = true }: ToolBarProps) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
Reference in New Issue
Block a user