Skip to content

Instantly share code, notes, and snippets.

@albertBarsegyan
Created April 25, 2022 21:35
Show Gist options
  • Save albertBarsegyan/754226b3af45d78a7771a595110c7061 to your computer and use it in GitHub Desktop.
Save albertBarsegyan/754226b3af45d78a7771a595110c7061 to your computer and use it in GitHub Desktop.
import RegularButton from "../button/regular.button";
import UsersTable from "../tables/usersTable";
import { useModal } from "../../context/modal.context";
import UserSearchBar from "./userSearchBar";
export default function UserTableContainer() {
const { toggleVisible } = useModal();
const openModal = () => {
toggleVisible();
};
return (
<div className="w-full mx-auto mt-10">
<div className="user-table-header">
<p className="text-2xl text-gray-800">Admin panel</p>
<RegularButton text="Add user" handleClick={openModal} type="button" />
</div>
<div>
<UserSearchBar />
</div>
<div className="overflow-auto">
<UsersTable />
</div>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment