Skip to content

Commit 112e6d9

Browse files
author
Maja Grubic
committed
Fix types
1 parent 24bcf27 commit 112e6d9

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

src/plugins/shared_ux/public/components/page_template/no_data_page/no_data_card/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
* in compliance with, at your election, the Elastic License 2.0 or the Server
66
* Side Public License, v 1.
77
*/
8-
export * from './no_data_card';
8+
export { NoDataCard } from './no_data_card';

src/plugins/shared_ux/public/components/page_template/no_data_page/no_data_card/no_data_card.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
import React from 'react';
1010
import { NoDataCard } from './no_data_card';
11-
import { NoDataPageActions } from './types';
11+
import type { NoDataCardProps } from './types';
1212

1313
export default {
1414
title: 'No Data Card',
1515
description: 'A wrapper around EuiCard, to be used on NoData page',
1616
};
1717

18-
type Params = Pick<NoDataPageActions, 'recommended' | 'button' | 'description'>;
18+
type Params = Pick<NoDataCardProps, 'recommended' | 'button' | 'description'>;
1919

2020
export const PureComponent = (params: Params) => {
2121
return (

src/plugins/shared_ux/public/components/page_template/no_data_page/no_data_card/no_data_card.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { i18n } from '@kbn/i18n';
1010
import React, { FunctionComponent } from 'react';
1111
import { EuiButton, EuiCard } from '@elastic/eui';
12-
import { NoDataPageActions } from './types';
12+
import type { NoDataCardProps } from './types';
1313

1414
const recommendedLabel = i18n.translate('sharedUX.pageTemplate.noDataPage.recommendedLabel', {
1515
defaultMessage: 'Recommended',
@@ -19,7 +19,7 @@ const defaultDescription = i18n.translate('sharedUX.pageTemplate.noDataCard.desc
1919
defaultMessage: `Proceed without collecting data`,
2020
});
2121

22-
export const NoDataCard: FunctionComponent<NoDataPageActions> = ({
22+
export const NoDataCard: FunctionComponent<NoDataCardProps> = ({
2323
recommended,
2424
title,
2525
button,

src/plugins/shared_ux/public/components/page_template/no_data_page/no_data_card/types.ts

+2-7
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,13 @@ export type NoDataCardProps = Partial<EuiCardProps> & {
2222
* Remapping `onClick` to any element
2323
*/
2424
onClick?: MouseEventHandler<HTMLElement>;
25-
/**
26-
* Category to auto-select within Fleet
27-
*/
28-
category?: string;
29-
3025
/**
3126
* Description for the card. If not provided, the default will be used.
3227
*/
3328
description?: string;
34-
3529
/**
36-
* Layout direction of the card
30+
* Layout direction of the card; needed for EuiCardPropsLayout:
31+
* https://github.com/elastic/eui/blob/main/src/components/card/card.tsx#L57
3732
*/
3833
layout?: 'vertical';
3934
};

0 commit comments

Comments
 (0)