From 7e446175b131233331f8ace56eba02b45ea1cac8 Mon Sep 17 00:00:00 2001 From: cchaos Date: Mon, 25 Feb 2019 12:33:33 -0500 Subject: [PATCH] Updating TS defs to And removing empty sass file --- .../badge/notification_badge/badge_notification.tsx | 10 ++-------- src/components/facet/_index.scss | 1 - src/components/facet/_mixins.scss | 0 src/components/facet/index.d.ts | 6 +++--- src/components/filter_group/index.d.ts | 8 ++++---- 5 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 src/components/facet/_mixins.scss diff --git a/src/components/badge/notification_badge/badge_notification.tsx b/src/components/badge/notification_badge/badge_notification.tsx index b2eff19b89e8..107973a2debb 100644 --- a/src/components/badge/notification_badge/badge_notification.tsx +++ b/src/components/badge/notification_badge/badge_notification.tsx @@ -21,20 +21,14 @@ export type BadgeNotificationSize = keyof typeof sizeToClassNameMap; export interface EuiNotificationBadgeProps extends CommonProps, HTMLAttributes { - children?: ReactNode; + children: ReactNode; size?: BadgeNotificationSize; color?: BadgeNotificationColor; } export const EuiNotificationBadge: FunctionComponent< EuiNotificationBadgeProps -> = ({ - children, - className, - size = 's', - color = 'accent', - ...rest -}) => { +> = ({ children, className, size = 's', color = 'accent', ...rest }) => { const classes = classNames( 'euiNotificationBadge', sizeToClassNameMap[size], diff --git a/src/components/facet/_index.scss b/src/components/facet/_index.scss index 37e36fb04e55..11053ba46949 100644 --- a/src/components/facet/_index.scss +++ b/src/components/facet/_index.scss @@ -1,6 +1,5 @@ @import '../button/variables'; @import '../button/mixins'; -@import 'mixins'; @import 'facet_button'; @import 'facet_group'; diff --git a/src/components/facet/_mixins.scss b/src/components/facet/_mixins.scss deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/src/components/facet/index.d.ts b/src/components/facet/index.d.ts index 1edb7f5811b2..0738db3a84b4 100644 --- a/src/components/facet/index.d.ts +++ b/src/components/facet/index.d.ts @@ -3,7 +3,7 @@ import React, { HTMLAttributes, ReactNode, MouseEventHandler, - SFC, + FunctionComponent, } from 'react'; import { CommonProps, RefCallback } from '../common'; /// @@ -25,7 +25,7 @@ declare module '@elastic/eui' { quantity: number; buttonRef: RefCallback; } - export const EuiFacetButton: SFC< + export const EuiFacetButton: FunctionComponent< CommonProps & ButtonHTMLAttributes> & EuiFacetButtonProps; /** @@ -39,6 +39,6 @@ declare module '@elastic/eui' { layout?: FacetGroupLayouts } - export const EuiFacetGroup: SFC< + export const EuiFacetGroup: FunctionComponent< CommonProps & HTMLAttributes> & EuiFacetGroupProps; } diff --git a/src/components/filter_group/index.d.ts b/src/components/filter_group/index.d.ts index 31de0b002b9e..d21fc3660d4e 100644 --- a/src/components/filter_group/index.d.ts +++ b/src/components/filter_group/index.d.ts @@ -2,7 +2,7 @@ import { CommonProps } from '../common'; import { IconType, IconSize } from '../icon' /// -import { SFC, ButtonHTMLAttributes, HTMLAttributes } from 'react'; +import { Component, FunctionComponent, ButtonHTMLAttributes, HTMLAttributes } from 'react'; declare module '@elastic/eui' { /** @@ -20,7 +20,7 @@ declare module '@elastic/eui' { grow?: boolean; noDivider?: boolean; } - export const EuiFilterButton: SFC & EuiFilterButtonProps; + export const EuiFilterButton: FunctionComponent & EuiFilterButtonProps; /** * Filter group type defs @@ -28,7 +28,7 @@ declare module '@elastic/eui' { * @see './filter_group.js' */ - export const EuiFilterGroup: SFC>; + export const EuiFilterGroup: FunctionComponent>; /** * Filter select item type defs @@ -41,7 +41,7 @@ declare module '@elastic/eui' { checked?: FilterChecked } - export const EuiFilterSelectItem: SFC & EuiFilterSelectItemProps >; }