@selfcommunity/react-templates
Version:
React Templates Components to integrate a Community created with SelfCommunity.
71 lines (70 loc) • 1.65 kB
TypeScript
import { LessonAppbarProps, LessonDrawerProps, SCLessonActionsType } from '@selfcommunity/react-ui';
export interface LessonProps {
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* The course id
*/
courseId: string | number;
/**
* The section id
*/
sectionId: string | number;
/**
* The lesson id
*/
lessonId: string | number;
/**
* Props to spread to LessonAppbar Component
* @default {}
*/
LessonAppbarProps?: LessonAppbarProps;
/**
* Props to spread to LessonDrawer Component
* @default {}
*/
LessonDrawerProps?: LessonDrawerProps;
/**
* Opens edit mode
* @default false
*/
editMode?: boolean;
/**
* Renders preview mode
* @default false
*/
previewMode?: boolean;
/**
* Callback fired on edit mode close
* @default null
*/
onEditModeClose?: () => void;
/**
* Handler on lesson change
* @default null
*/
onLessonChange?: (lessonId: any, sectionId: any) => void;
/**
* Handler on panel change
* @default null
*/
onActivePanelChange?: (panel: any) => void;
/**
* Handler on status change
* @default null
*/
onLessonStatusChange?: () => void;
/**
* If passed renders the component with a specific section opened
* @default null
*/
lessonAction?: SCLessonActionsType;
/**
* Any other properties
*/
[p: string]: any;
}
export default function Lesson(inProps: LessonProps): JSX.Element;