24 lines
817 B
TypeScript
24 lines
817 B
TypeScript
import { FC } from "react";
|
||
import { Group, TextInput } from "@mantine/core";
|
||
import { useClientsContext } from "@/app/clients/contexts/ClientsContext";
|
||
import useClientsActions from "@/app/clients/hooks/utils/useClientsActions";
|
||
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
||
|
||
const ClientDesktopHeader: FC = () => {
|
||
const { search, setSearch } = useClientsContext();
|
||
const { onCreateClick } = useClientsActions();
|
||
|
||
return (
|
||
<Group gap={"xs"}>
|
||
<InlineButton onClick={onCreateClick}>Создать клиента</InlineButton>
|
||
<TextInput
|
||
placeholder={"Поиск"}
|
||
value={search}
|
||
onChange={e => setSearch(e.target.value)}
|
||
/>
|
||
</Group>
|
||
);
|
||
};
|
||
|
||
export default ClientDesktopHeader;
|