Add sticker interfaces and types.
This commit is contained in:
25
types/StickerContext.d.ts
vendored
25
types/StickerContext.d.ts
vendored
@@ -1,3 +1,28 @@
|
|||||||
interface StickersContextState {
|
interface StickersContextState {
|
||||||
stickersMonth: StickerDays;
|
stickersMonth: StickerDays;
|
||||||
|
addEditSticker: (date: Date, sticker: ValidStickerVal) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
type StickerVal = -2 | -1 | 0 | 1 | 2 | null;
|
||||||
|
|
||||||
|
type ValidStickerVal = -2 | -1 | 0 | 1 | 2;
|
||||||
|
|
||||||
|
interface AddEditStickerProps {
|
||||||
|
date: Date;
|
||||||
|
sticker: ValidStickerVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Sticker {
|
||||||
|
id: string;
|
||||||
|
date: Date;
|
||||||
|
sticker: StickerVal;
|
||||||
|
edited: boolean;
|
||||||
|
manual: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
type StickerDays = Sticker[];
|
||||||
|
|
||||||
|
interface MonthSticker {
|
||||||
|
date: Date;
|
||||||
|
month: Sticker[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user