Add stickerVal to the types files.
This commit is contained in:
@@ -8,7 +8,7 @@ import DemoStickers from "./stickers/DemoStickers";
|
|||||||
interface DayProps {
|
interface DayProps {
|
||||||
isOverflow?: boolean;
|
isOverflow?: boolean;
|
||||||
overflowDirection?: "next" | "prev" | null;
|
overflowDirection?: "next" | "prev" | null;
|
||||||
sticker: -2 | -1 | 0 | 1 | 2 | null;
|
sticker: StickerVal;
|
||||||
date: Date;
|
date: Date;
|
||||||
selectedDate: Date;
|
selectedDate: Date;
|
||||||
}
|
}
|
||||||
@@ -18,7 +18,7 @@ interface DayProps {
|
|||||||
* @param props the props for this component.
|
* @param props the props for this component.
|
||||||
* @param {boolean} props.isOverflow is the current date being given before or after the current month.
|
* @param {boolean} props.isOverflow is the current date being given before or after the current month.
|
||||||
* @param {"next" | "prev" | null} props.overflowDirection the direction the overflow is. This will navigate the calender forward or backwards 1 month.
|
* @param {"next" | "prev" | null} props.overflowDirection the direction the overflow is. This will navigate the calender forward or backwards 1 month.
|
||||||
* @param {-2 | -1 | 0 | 1 | 2 | null} props.sticker the sticker for this date.
|
* @param {StickerVal} props.sticker the sticker for this date.
|
||||||
* @param {date} props.date the date for this day.
|
* @param {date} props.date the date for this day.
|
||||||
* @param {date} props.selectedDate the date for the selected month.
|
* @param {date} props.selectedDate the date for the selected month.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import React, { FC } from "react";
|
|||||||
// TODO: When themes are made import the theme from user settings context. Refactor to use whatever those SVGs are.
|
// TODO: When themes are made import the theme from user settings context. Refactor to use whatever those SVGs are.
|
||||||
|
|
||||||
interface DemoStickersProps {
|
interface DemoStickersProps {
|
||||||
stickerVal: 2 | 1 | 0 | -1 | -2;
|
stickerVal: StickerVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
const DemoStickers: FC<DemoStickersProps> = ({
|
const DemoStickers: FC<DemoStickersProps> = ({
|
||||||
|
|||||||
4
types/CalenderContext.d.ts
vendored
4
types/CalenderContext.d.ts
vendored
@@ -14,9 +14,11 @@ interface WeekDays {
|
|||||||
monday: DaysOfWeek;
|
monday: DaysOfWeek;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type StickerVal = -2 | -1 | 0 | 1 | 2 | null;
|
||||||
|
|
||||||
interface Sticker {
|
interface Sticker {
|
||||||
date: Date;
|
date: Date;
|
||||||
sticker: -2 | -1 | 0 | 1 | 2 | null;
|
sticker: StickerVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
type StickerDays = Sticker[];
|
type StickerDays = Sticker[];
|
||||||
|
|||||||
Reference in New Issue
Block a user