react-fill-calendar 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.d.ts +30 -0
  2. package/package.json +5 -2
  3. package/readme.md +9 -2
package/index.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import * as React from "react";
2
+
3
+ export type CalendarSelectedDate = string | { day: string };
4
+
5
+ export interface CalendarProps {
6
+ fillingColor?: string;
7
+ borderfillColor?: string;
8
+ hoverborderColor?: string;
9
+ cellBorderColor?: string;
10
+ cellColor?: string;
11
+ legend?: boolean;
12
+ mainBorder?: boolean;
13
+ borderColor?: string;
14
+ textColor?: string;
15
+ selectedDates?: CalendarSelectedDate[];
16
+ title?: string;
17
+ }
18
+
19
+ /**
20
+ * Default export: FillCalendar component, which simply forwards props
21
+ * to the underlying Calendar component.
22
+ */
23
+ declare const FillCalendar: React.FC<CalendarProps>;
24
+
25
+ /**
26
+ * Named export of the core Calendar component.
27
+ */
28
+ export declare const Calendar: React.FC<CalendarProps>;
29
+
30
+ export default FillCalendar;
package/package.json CHANGED
@@ -1,18 +1,21 @@
1
1
  {
2
2
  "name": "react-fill-calendar",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Fill dates on a calendar displaying boxes for dates. Customize colors and borders. Perfect for habit tracking or event marking in React applications.",
5
5
  "main": "dist/index.umd.cjs",
6
6
  "module": "dist/index.js",
7
+ "types": "index.d.ts",
7
8
  "type": "module",
8
9
  "exports": {
9
10
  ".": {
11
+ "types": "./index.d.ts",
10
12
  "import": "./dist/index.js",
11
13
  "require": "./dist/index.umd.cjs"
12
14
  }
13
15
  },
14
16
  "files": [
15
- "dist"
17
+ "dist",
18
+ "index.d.ts"
16
19
  ],
17
20
  "scripts": {
18
21
  "dev": "vite",
package/readme.md CHANGED
@@ -27,7 +27,7 @@ A lightweight, customizable React calendar component that automatically fills an
27
27
  const Calendar = () => {
28
28
  return (
29
29
  <div>
30
- <Calenar
30
+ <Calendar
31
31
  fillingColor = "#50C878",
32
32
  borderfillColor = "#27592D",
33
33
  hoverborderColor = "#FFCCCB",
@@ -37,7 +37,14 @@ A lightweight, customizable React calendar component that automatically fills an
37
37
  mainBorder = true,
38
38
  borderColor = "#708090",
39
39
  textColor = "#708090",
40
- selectedDates = [],
40
+ selectedDates = [
41
+ {
42
+ day: '2026-1-13',
43
+ },
44
+ {
45
+ day: '2026-1-15',
46
+ },
47
+ ],
41
48
  title = "Calendar"
42
49
  />
43
50
  </div>