@super-calendar/native 2.10.0 → 2.11.0

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.
@@ -9,6 +9,7 @@ import {
9
9
  Text,
10
10
  type TextStyle,
11
11
  View,
12
+ type ScrollViewProps,
12
13
  } from "react-native";
13
14
  import { Gesture, GestureDetector, type PanGesture } from "react-native-gesture-handler";
14
15
  import { useCalendarTheme } from "../theme";
@@ -103,6 +104,8 @@ export type YearViewProps<T = unknown> = SlotStyleProps<YearViewSlot> & {
103
104
  * the last, exclusive). A plain tap still fires `onPressDay`, not this.
104
105
  */
105
106
  onCreateEvent?: (start: Date, end: Date) => void;
107
+ /** Pull-to-refresh control, mounted on the year's scroll view. */
108
+ refreshControl?: ScrollViewProps["refreshControl"];
106
109
  };
107
110
 
108
111
  // Seed before the first layout pass so the grid renders immediately (and in
@@ -126,6 +129,7 @@ function YearViewInner<T>({
126
129
  onPressMonth,
127
130
  onSelectDrag,
128
131
  onCreateEvent,
132
+ refreshControl,
129
133
  classNames,
130
134
  styles: styleOverrides,
131
135
  }: YearViewProps<T>): ReactElement {
@@ -244,6 +248,7 @@ function YearViewInner<T>({
244
248
  // under the finger. On the web a press arms it immediately, so freezing
245
249
  // there would cost every touch scroll; the browser arbitrates instead.
246
250
  scrollEnabled={isWeb || sweep == null}
251
+ refreshControl={refreshControl}
247
252
  >
248
253
  <View {...slot("grid", { base: styles.grid })}>
249
254
  {months.map((month, monthIndex) => {