Skip to content

Commit

Permalink
Updating TS defs to
Browse files Browse the repository at this point in the history
And removing empty sass file
  • Loading branch information
cchaos committed Feb 25, 2019
1 parent b7e736f commit 7e44617
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
10 changes: 2 additions & 8 deletions src/components/badge/notification_badge/badge_notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ export type BadgeNotificationSize = keyof typeof sizeToClassNameMap;
export interface EuiNotificationBadgeProps
extends CommonProps,
HTMLAttributes<HTMLSpanElement> {
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],
Expand Down
1 change: 0 additions & 1 deletion src/components/facet/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import '../button/variables';
@import '../button/mixins';
@import 'mixins';

@import 'facet_button';
@import 'facet_group';
Empty file removed src/components/facet/_mixins.scss
Empty file.
6 changes: 3 additions & 3 deletions src/components/facet/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, {
HTMLAttributes,
ReactNode,
MouseEventHandler,
SFC,
FunctionComponent,
} from 'react';
import { CommonProps, RefCallback } from '../common';
/// <reference path="../flex/index.d.ts" />
Expand All @@ -25,7 +25,7 @@ declare module '@elastic/eui' {
quantity: number;
buttonRef: RefCallback<HTMLButtonElement>;
}
export const EuiFacetButton: SFC<
export const EuiFacetButton: FunctionComponent<
CommonProps & ButtonHTMLAttributes<HTMLButtonElement>> & EuiFacetButtonProps;

/**
Expand All @@ -39,6 +39,6 @@ declare module '@elastic/eui' {
layout?: FacetGroupLayouts
}

export const EuiFacetGroup: SFC<
export const EuiFacetGroup: FunctionComponent<
CommonProps & HTMLAttributes<HTMLDivElement>> & EuiFacetGroupProps;
}
8 changes: 4 additions & 4 deletions src/components/filter_group/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CommonProps } from '../common';
import { IconType, IconSize } from '../icon'
/// <reference path="../button/index.d.ts" />

import { SFC, ButtonHTMLAttributes, HTMLAttributes } from 'react';
import { Component, FunctionComponent, ButtonHTMLAttributes, HTMLAttributes } from 'react';

declare module '@elastic/eui' {
/**
Expand All @@ -20,15 +20,15 @@ declare module '@elastic/eui' {
grow?: boolean;
noDivider?: boolean;
}
export const EuiFilterButton: SFC<EuiButtonEmptyProps> & EuiFilterButtonProps;
export const EuiFilterButton: FunctionComponent<EuiButtonEmptyProps> & EuiFilterButtonProps;

/**
* Filter group type defs
*
* @see './filter_group.js'
*/

export const EuiFilterGroup: SFC<CommonProps & HTMLAttributes<HTMLDivElement>>;
export const EuiFilterGroup: FunctionComponent<CommonProps & HTMLAttributes<HTMLDivElement>>;

/**
* Filter select item type defs
Expand All @@ -41,7 +41,7 @@ declare module '@elastic/eui' {
checked?: FilterChecked
}

export const EuiFilterSelectItem: SFC<CommonProps &
export const EuiFilterSelectItem: Component<CommonProps &
ButtonHTMLAttributes<HTMLButtonElement> & EuiFilterSelectItemProps
>;
}

0 comments on commit 7e44617

Please sign in to comment.