From d057b77dc5585756f1df7fad03a415314bd9111b Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 24 May 2018 10:42:48 -0700 Subject: Address PR feedback --- packages/typescript-typings/CHANGELOG.json | 8 ++++ .../types/react-joyride/index.d.ts | 52 +++++++++++++--------- 2 files changed, 38 insertions(+), 22 deletions(-) (limited to 'packages/typescript-typings') diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index 2e2998bb3..77a5ffad2 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -1,4 +1,12 @@ [ + { + "version": "0.4.0", + "changes": [ + { + "note": "Add types for `react-joyride`" + } + ] + }, { "timestamp": 1527009133, "version": "0.3.2", diff --git a/packages/typescript-typings/types/react-joyride/index.d.ts b/packages/typescript-typings/types/react-joyride/index.d.ts index 3aa5852f7..6c1a5b092 100644 --- a/packages/typescript-typings/types/react-joyride/index.d.ts +++ b/packages/typescript-typings/types/react-joyride/index.d.ts @@ -4,31 +4,39 @@ declare module 'react-joyride' { import * as React from 'react'; export interface StyleOptions { - arrowColor?: string, - backgroundColor?: string, - primaryColor?: string, - textColor?: string, - overlayColor?: string, - spotlightShadow?: string, - beaconSize?: number, - zIndex?: number, + arrowColor?: string; + backgroundColor?: string; + primaryColor?: string; + textColor?: string; + overlayColor?: string; + spotlightShadow?: string; + beaconSize?: number; + zIndex?: number; } - - export type Placement = "top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "right" | "left"; + + export type Placement = + | 'top' + | 'top-left' + | 'top-right' + | 'bottom' + | 'bottom-left' + | 'bottom-right' + | 'right' + | 'left'; export interface Step { title?: string; content: React.ReactNode; target: string; placement?: Placement; - type?: "click" | "hover"; + type?: 'click' | 'hover'; isFixed?: boolean; allowClicksThruHole?: boolean; disableBeacon?: boolean; style?: StyleOptions; [prop: string]: any; } - + interface StyleOptionsProp { options: StyleOptions; } @@ -43,19 +51,19 @@ declare module 'react-joyride' { debug?: boolean; styles?: StyleOptionsProp; } - + export interface State { - action: string, - controlled: boolean, - index: number, - lifecycle: string, - size: 0, - status: string, + action: string; + controlled: boolean; + index: number; + lifecycle: string; + size: 0; + status: string; } - + export default class Joyride extends React.Component { constructor(props: Props); - + static defaultProps: Props; } -} \ No newline at end of file +} -- cgit v1.2.3