-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TM-1385] change position of create user button to user list in admin…
… view (#709)
- Loading branch information
1 parent
df28d4a
commit 2df8bc5
Showing
3 changed files
with
27 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import DownloadIcon from "@mui/icons-material/GetApp"; | ||
import { Button, CreateButton, FilterButton, TopToolbar } from "react-admin"; | ||
import { When } from "react-if"; | ||
|
||
interface ListActionsCreateFilterProps { | ||
isSuperAdmin?: boolean; | ||
onExport?: () => void; | ||
} | ||
|
||
const ListActionsCreateFilter = ({ isSuperAdmin, onExport }: ListActionsCreateFilterProps) => ( | ||
<TopToolbar> | ||
<When condition={isSuperAdmin}> | ||
<CreateButton className="filter-button-page-admin" /> | ||
</When> | ||
<FilterButton className="filter-button-page-admin" /> | ||
<When condition={!!onExport}> | ||
<Button className="button-page-admin" label="Export" startIcon={<DownloadIcon />} onClick={onExport} /> | ||
</When> | ||
</TopToolbar> | ||
); | ||
|
||
export default ListActionsCreateFilter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters