Typescript
This commit is contained in:
@@ -12,21 +12,7 @@ import { Map } from "../types/Map";
|
||||
import { Group, GroupContainer } from "../types/Group";
|
||||
import { MapState } from "../types/MapState";
|
||||
import { Token } from "../types/Token";
|
||||
|
||||
type SelectDataProps = {
|
||||
isOpen: boolean;
|
||||
onRequestClose: () => void;
|
||||
onConfirm: (
|
||||
checkedMaps: SelectData[],
|
||||
checkedTokens: SelectData[],
|
||||
checkedMapGroups: Group[],
|
||||
checkedTokenGroups: Group[]
|
||||
) => void;
|
||||
confirmText: string;
|
||||
label: string;
|
||||
databaseName: string;
|
||||
filter: (table: string, data: Map | MapState | Token, id: string) => boolean;
|
||||
};
|
||||
import { RequestCloseEventHandler } from "../types/Events";
|
||||
|
||||
export type SelectData = {
|
||||
name: string;
|
||||
@@ -35,6 +21,23 @@ export type SelectData = {
|
||||
checked: boolean;
|
||||
};
|
||||
|
||||
export type ConfirmDataEventHandler = (
|
||||
checkedMaps: SelectData[],
|
||||
checkedTokens: SelectData[],
|
||||
checkedMapGroups: Group[],
|
||||
checkedTokenGroups: Group[]
|
||||
) => void;
|
||||
|
||||
type SelectDataProps = {
|
||||
isOpen: boolean;
|
||||
onRequestClose: RequestCloseEventHandler;
|
||||
onConfirm: ConfirmDataEventHandler;
|
||||
confirmText: string;
|
||||
label: string;
|
||||
databaseName: string;
|
||||
filter: (table: string, data: Map | MapState | Token, id: string) => boolean;
|
||||
};
|
||||
|
||||
type DataRecord = Record<string, SelectData>;
|
||||
|
||||
function SelectDataModal({
|
||||
|
||||
Reference in New Issue
Block a user