From 48a32565f2bbff0a5e1b351182a3086a059f3bd2 Mon Sep 17 00:00:00 2001 From: Dan Labrecque Date: Wed, 7 Nov 2018 15:27:21 -0500 Subject: [PATCH] fix(dropdown): Address typescript errors (#898) This fixes the various typescript errors encountered while the Dropdown component in the Koku UI Fixes https://github.com/patternfly/patternfly-react/issues/892 --- .../react-core/src/components/Dropdown/Dropdown.d.ts | 10 ++++++---- .../src/components/Dropdown/DropdownToggle.d.ts | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.d.ts b/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.d.ts index 73cd99a223b..2567703c7e4 100644 --- a/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.d.ts +++ b/packages/patternfly-4/react-core/src/components/Dropdown/Dropdown.d.ts @@ -1,15 +1,17 @@ import { SFC, HTMLProps, ReactType, ReactNode } from 'react'; import { OneOf } from '../../typeUtils'; -import { DropdownToggleProps } from './DropdownToggle'; +import DropdownToggle from './DropdownToggle'; import { DropdownPosition, DropdownDirection } from './dropdownConstants'; export interface DropdownProps extends HTMLProps { children?: ReactNode; - isOpen?: Boolean; - isAction?: Boolean; + dropdownItems: ReactNode[]; + isOpen?: boolean; + isAction?: boolean; + onSelect?: Function; position?: OneOf; direction?: OneOf; - toggle?: DropdownToggleProps; + toggle?: DropdownToggle; } declare const Dropdown: SFC; diff --git a/packages/patternfly-4/react-core/src/components/Dropdown/DropdownToggle.d.ts b/packages/patternfly-4/react-core/src/components/Dropdown/DropdownToggle.d.ts index 0101a28fccf..06a75331703 100644 --- a/packages/patternfly-4/react-core/src/components/Dropdown/DropdownToggle.d.ts +++ b/packages/patternfly-4/react-core/src/components/Dropdown/DropdownToggle.d.ts @@ -3,9 +3,9 @@ import { SFC, HTMLProps, ReactType, ReactNode } from 'react'; export interface DropdownToggleProps extends HTMLProps { id?: string; children?: ReactNode; - isOpen?: Boolean; + isOpen?: boolean; onToggle?: Function; - parentRef: HTMLElement; + parentRef?: HTMLElement; isFocused?: boolean; isHovered?: boolean; isActive?: boolean;