mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Update react-flatpickr with flatpickr's new exports
It switched to a default export that contains nested-nested types.
This commit is contained in:
Vendored
+3
-3
@@ -5,12 +5,12 @@
|
||||
// TypeScript Version: 2.6
|
||||
|
||||
import { Component } from 'react';
|
||||
import { Options } from 'flatpickr';
|
||||
import flatpickr from 'flatpickr';
|
||||
|
||||
export interface DateTimePickerProps {
|
||||
defaultValue?: string;
|
||||
options?: Options.Options;
|
||||
onChange?: Options.Hook;
|
||||
options?: flatpickr.Options.Options;
|
||||
onChange?: flatpickr.Options.Hook;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Instance } from 'flatpickr';
|
||||
import flatpickr from 'flatpickr';
|
||||
import * as React from 'react';
|
||||
import DatePicker from 'react-flatpickr';
|
||||
|
||||
@@ -12,7 +12,7 @@ const options = {
|
||||
const optionsElement = <DatePicker options={ options }/>;
|
||||
|
||||
const onChange = (
|
||||
selectedDates: Date[], dateStr: string, instance: Instance,
|
||||
selectedDates: Date[], dateStr: string, instance: flatpickr.Instance,
|
||||
elem: HTMLElement
|
||||
) => null;
|
||||
const onChangeElement = <DatePicker onChange={ onChange }/>;
|
||||
|
||||
Reference in New Issue
Block a user