Skip to content

Commit

Permalink
fix type for FieldStatsFlyoutProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Apr 19, 2023
1 parent eb9f239 commit 761cf47
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,20 @@
* 2.0.
*/

import React, { useCallback, useState } from 'react';
import React, { useCallback, useState, type FC } from 'react';
import type { DataView } from '@kbn/data-plugin/common';
import type { FieldStatsServices } from '@kbn/unified-field-list-plugin/public';
import type { TimeRange as TimeRangeMs } from '@kbn/ml-date-picker';
import type { FieldStatsProps } from '@kbn/unified-field-list-plugin/public';
import { MLJobWizardFieldStatsFlyoutContext } from './use_field_stats_flytout_context';
import { FieldStatsFlyout } from './field_stats_flyout';

export const FieldStatsFlyoutProvider = ({
dataView,
fieldStatsServices,
timeRangeMs,
dslQuery,
children,
}: {
export const FieldStatsFlyoutProvider: FC<{
dataView: DataView;
fieldStatsServices: FieldStatsServices;
timeRangeMs?: TimeRangeMs;
dslQuery?: FieldStatsProps['dslQuery'];
children: React.ReactElement;
}) => {
}> = ({ dataView, fieldStatsServices, timeRangeMs, dslQuery, children }) => {
const [isFieldStatsFlyoutVisible, setFieldStatsIsFlyoutVisible] = useState(false);
const [fieldName, setFieldName] = useState<string | undefined>();
const [fieldValue, setFieldValue] = useState<string | number | undefined>();
Expand Down

0 comments on commit 761cf47

Please sign in to comment.