UNPKG

planby

Version:

<div align="center" style="margin-bottom: 10px"> <a href="https://www.npmjs.com/package/planby"> <img src="https://i.postimg.cc/J0XMPHNQ/planby-logo.png" alt="Planby logo" /> </a> </div>

48 lines (47 loc) 1.55 kB
import React from "react"; import { ProgramItem, ChannelWithPosition, DateTime, Position, BaseTimeFormat } from "../helpers/types"; interface RenderTimeline { isBaseTimeFormat: BaseTimeFormat; isSidebar: boolean; isRTL: boolean; sidebarWidth: number; hourWidth: number; numberOfHoursInDay: number; offsetStartHoursRange: number; dayWidth: number; } interface LayoutProps { programs: ProgramItem[]; channels: ChannelWithPosition[]; startDate: DateTime; endDate: DateTime; scrollY: number; dayWidth: number; hourWidth: number; numberOfHoursInDay: number; offsetStartHoursRange: number; sidebarWidth: number; itemHeight: number; ref: React.RefObject<HTMLDivElement>; onScroll: (e: React.UIEvent<HTMLDivElement, UIEvent> & { target: Element; }) => void; isRTL?: boolean; isBaseTimeFormat?: BaseTimeFormat; isSidebar?: boolean; isTimeline?: boolean; isLine?: boolean; isProgramVisible: (position: Position) => boolean; isChannelVisible: (position: Pick<Position, "top">) => boolean; renderProgram?: (v: { program: ProgramItem; isRTL: boolean; isBaseTimeFormat: BaseTimeFormat; }) => React.ReactNode; renderChannel?: (v: { channel: ChannelWithPosition; }) => React.ReactNode; renderTimeline?: (v: RenderTimeline) => React.ReactNode; } export declare const Layout: ({ ref: scrollBoxRef, ...props }: LayoutProps) => JSX.Element; export {};