-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathAddTagPanel.tsx
More file actions
26 lines (24 loc) · 831 Bytes
/
AddTagPanel.tsx
File metadata and controls
26 lines (24 loc) · 831 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import React from "react";
import { IFilter } from "../../IFilter";
import { observer } from "mobx-react";
import { FilterHolder } from "./BulkEditPage";
import { BulkEditPanel } from "./BulkEditPanel";
import { AddTagAllBooksInFilter } from "./BulkChangeFunctions";
export const AddTagPanel: React.FunctionComponent<{
filterHolder: FilterHolder;
refresh: () => void;
backgroundColor: string;
}> = observer((props) => {
return (
<BulkEditPanel
panelLabel="Add Tag"
newValueLabel="New Tag"
actionButtonLabel="Add Tag"
performChangesToAllMatchingBooks={AddTag}
{...props}
/>
);
});
async function AddTag(filter: IFilter, tag: string, refresh: () => void) {
AddTagAllBooksInFilter(filter, tag, refresh);
}