Skip to content

Commit

Permalink
fix(Type Definitions): Add typescript definitions for all components
Browse files Browse the repository at this point in the history
  • Loading branch information
rcdexta committed Nov 23, 2018
1 parent 151d65d commit 3a865c8
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "react-event-timeline",
"description": "A responsive event timeline in React.js",
"main": "dist/index.js",
"typings": "typings",
"files": [
"src",
"dist",
"typings",
"README"
],
"scripts": {
Expand Down
42 changes: 42 additions & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import * as React from 'react';

export interface TimelineProps {
orientation: string
style: React.CSSProperties,
lineColor: string,
lineStyle: object
}

export interface TimelineEventProps {
title: React.ReactNode
subtitle: React.ReactNode
createdAt: React.ReactNode
children: React.ReactNode
buttons: React.ReactNode
container: string
icon: React.ReactNode
iconColor: string
iconStyle: object
bubbleStyle: object
orientation: string
contentStyle: object
cardHeaderStyle: object
style: object
titleStyle: object
subtitleStyle: object
collapsible: boolean
showContent: boolean
}

export interface TimelineBlipProps {
title: React.ReactNode,
icon: React.ReactNode,
iconColor: string,
iconStyle: object,
style: object,
orientation: string
}

export class Timeline extends React.Component<TimelineProps> {}
export class TimelineEvent extends React.Component<TimelineEventProps> {}
export class TimelineBlip extends React.Component<TimelineBlipProps> {}

0 comments on commit 3a865c8

Please sign in to comment.