react-fill-calendar 0.1.2 → 0.1.4

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 +16 -3
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.4",
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
@@ -1,3 +1,7 @@
1
+ ![NPM Version](https://img.shields.io/npm/v/react-fill-calendar)
2
+ ![NPM Downloads](https://img.shields.io/npm/dw/react-fill-calendar)
3
+ ![npm bundle size](https://img.shields.io/bundlephobia/min/react-fill-calendar)
4
+
1
5
  # React Filled Calendar
2
6
 
3
7
  A lightweight, customizable React calendar component that automatically fills and highlights dates passed in as props. Designed for simplicity, reusability, and easy styling with Tailwind and DaisyUI.
@@ -18,16 +22,18 @@ A lightweight, customizable React calendar component that automatically fills an
18
22
 
19
23
  `npm install react-fill-calendar`
20
24
 
21
-
22
25
  ### Example
23
26
 
27
+ <div style="display: flex; justify-content: space-around"> <img src="https://github.com/apmanager001/react-fill-calendar/blob/main/assets/calendar.png?raw=true" width="300" alt='image of component'/>
28
+ </div>
29
+
24
30
  ```
25
31
  import Calendar from 'react-fill-calendar'
26
32
 
27
33
  const Calendar = () => {
28
34
  return (
29
35
  <div>
30
- <Calenar
36
+ <Calendar
31
37
  fillingColor = "#50C878",
32
38
  borderfillColor = "#27592D",
33
39
  hoverborderColor = "#FFCCCB",
@@ -37,7 +43,14 @@ A lightweight, customizable React calendar component that automatically fills an
37
43
  mainBorder = true,
38
44
  borderColor = "#708090",
39
45
  textColor = "#708090",
40
- selectedDates = [],
46
+ selectedDates = [
47
+ {
48
+ day: '2026-1-13',
49
+ },
50
+ {
51
+ day: '2026-1-15',
52
+ },
53
+ ],
41
54
  title = "Calendar"
42
55
  />
43
56
  </div>