Skip to content

Commit 7a7f1bb

Browse files
authored
Merge pull request #1183 from meops/add-stories-missing-types
Add some missing type annotations in stories
2 parents 6b20449 + f4a8aab commit 7a7f1bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stories/issue-712.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const Basic: Story = {
2525
changeSelectedDate(end)
2626
}, [])
2727

28-
const onPressEvent = useCallback((event) => {
28+
const onPressEvent = useCallback((event: ICalendarEventBase) => {
2929
console.log(event)
3030
}, [])
3131

stories/mobile.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import dayjs from 'dayjs'
33
import React from 'react'
44
import { Alert, Text, TouchableOpacity, View } from 'react-native'
55

6-
import { Calendar, type EventRenderer, type ICalendarEventBase } from '../src'
6+
import { Calendar, type EventRenderer, type HasDateRange, type ICalendarEventBase } from '../src'
77
import { AppHeader, HEADER_HEIGHT } from './components/AppHeader'
88
import { events, tonsOfEvents, tonsOfEventsSorted } from './events'
99
import { useEvents } from './hooks'
@@ -109,7 +109,7 @@ export const DoNotShowTime: Story = {
109109

110110
export const OnDateChanged: Story = {
111111
render: () => {
112-
const onChangeDate = React.useCallback(([start, end]) => {
112+
const onChangeDate = React.useCallback(([start, end]: HasDateRange) => {
113113
alert(`${start} - ${end}`)
114114
}, [])
115115

0 commit comments

Comments
 (0)