gantt-for-react icon indicating copy to clipboard operation
gantt-for-react copied to clipboard

It is not working with tsx file.

Open dakshineshwar opened this issue 7 years ago • 2 comments

@hustcc Please suggest the solution to work with tsx file.

dakshineshwar avatar Jun 22 '18 09:06 dakshineshwar

Can you help me to add types def.

hustcc avatar Aug 01 '18 05:08 hustcc

` declare module 'gantt-for-react' { import { Component, ReactNode } from 'react';

export interface Task {
  id: number;
  name: string;
  start: Date;
  end: Date;
  progress?: number;
  dependencies?: number[];
  custom_class?: string;
}

export type ViewMode = 'Quarter Day' | 'Half Day' | 'Day' | 'Week' | 'Month';

export type PopupHtmlFunction = (task: Task) => ReactNode;

export interface GanttProps {
  tasks: Task[];
  viewMode: ViewMode;
  customPopupHtml?: string | PopupHtmlFunction;
  onClick?: (task: Task) => void;
  onDateChange?: (task: Task, start: Date, end: Date) => void;
  onProgressChange?: (task: Task, progress: number) => void;
  onViewChange?: (mode: ViewMode) => void;
}

export class Gantt extends Component<GanttProps> {}

} `

Something like this

add gantt-for-react.d.ts and it should be done

mariobdom avatar Aug 28 '23 08:08 mariobdom