Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

chore(Tooltip): move to function component #2357

Merged
merged 10 commits into from
Feb 17, 2020
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as keyboardKey from 'keyboard-key'
import { Accessibility } from '../../types'
import { Accessibility, AccessibilityAttributes } from '../../types'

/**
* @description
Expand Down Expand Up @@ -52,4 +52,4 @@ export type TooltipBehaviorProps = {
open: boolean
/** Tooltip's container id. */
contentId: string
}
} & Pick<AccessibilityAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby'>
1 change: 1 addition & 0 deletions packages/accessibility/src/behaviors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export { default as accordionTitleBehavior } from './Accordion/accordionTitleBeh
export { default as accordionContentBehavior } from './Accordion/accordionContentBehavior'
export { default as checkboxBehavior } from './Checkbox/checkboxBehavior'
export * from './Checkbox/checkboxBehavior'
export * from './Tooltip/tooltipAsDescriptionBehavior'
export { default as tooltipAsDescriptionBehavior } from './Tooltip/tooltipAsDescriptionBehavior'
export { default as tooltipAsLabelBehavior } from './Tooltip/tooltipAsLabelBehavior'
export { default as sliderBehavior } from './Slider/sliderBehavior'
Expand Down
2 changes: 2 additions & 0 deletions packages/react-proptypes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const typeOf = (x: any) => Object.prototype.toString.call(x)
export const domNode = (props: ObjectOf<any>, propName: string) => {
// skip if prop is undefined
if (props[propName] === undefined) return undefined
// skip if prop is null
if (props[propName] === null) return null
// skip if prop is valid
if (props[propName] instanceof Element) return undefined

Expand Down
Loading