UNPKG

@selfcommunity/react-ui

Version:

React UI Components to integrate a Community created with SelfCommunity Platform.

64 lines (60 loc) 2.26 kB
import { CacheStrategies } from '@selfcommunity/utils'; import { BaseDialogProps } from '../../shared/BaseDialog'; import { WidgetProps } from '../Widget'; import { VirtualScrollerItemProps } from '../../types/virtualScroller'; import { CourseProps } from '../Course'; export interface UserCreatedCoursesWidgetProps extends VirtualScrollerItemProps, WidgetProps { /** * The user id * @default null */ userId: number; /** * Limit the number of courses to show * @default false */ limit?: number; /** * Props to spread to single course object * @default empty object */ CourseProps?: CourseProps; /** * Caching strategies * @default CacheStrategies.CACHE_FIRST */ cacheStrategy?: CacheStrategies; /** * Props to spread to subscribed courses dialog * @default {} */ DialogProps?: BaseDialogProps; /** * Other props */ [p: string]: any; } /** * > API documentation for the Community-JS User Profile Courses Created Widget component. Learn about the available props and the CSS API. * * * This component renders the list of the courses that the given user follows. * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserCreatedCourses) #### Import ```jsx import {UserCreatedCoursesWidget} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCUserCreatedCoursesWidget` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCUserCreatedCoursesWidget-root|Styles applied to the root element.| |title|.SCUserCreatedCoursesWidget-title|Styles applied to the title element.| |noResults|.SCUserCreatedCoursesWidget-no-results|Styles applied to no results section.| |showMore|.SCUserCreatedCoursesWidget-show-more|Styles applied to show more button element.| |dialogRoot|.SCUserCreatedCoursesWidget-dialog-root|Styles applied to the root dialog element.| |endMessage|.SCUserCreatedCoursesWidget-end-message|Styles applied to the end message element.| * @param inProps */ export default function UserCreatedCoursesWidget(inProps: UserCreatedCoursesWidgetProps): JSX.Element;