Skip to main content

Course

Interfaces

CourseProps

API documentation for the Community-JS Widget component. Learn about the available props and the CSS API.

Import

import {Widget} from '@selfcommunity/react-ui';

Component Name

The name SCWidget can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCWidget-rootStyles applied to the root element.

Extends

Indexable

[p: string]: any

Any other properties

Properties

PropertyTypeDescriptionInherited from
actions?ReactNodeActions Default null-
className?stringOverrides or extends the styles applied to the component. Default nullWidgetProps.className
course?SCCourseTypeCourse Object Default null-
courseId?numberId of the course for filter the feed Default null-
CourseParticipantsButtonComponentProps?CourseParticipantsButtonPropsProps to spread to CourseParticipantsButton component Default {}-
CourseSkeletonComponentProps?CourseSkeletonPropsProps to spread to CourseSkeleton component Default {}-
template?SCCourseTemplateTypeCourse template type Default 'preview'-
userProfileSnippet?booleanIt shows a different snippet type-

CourseSkeletonProps

API documentation for the Community-JS Widget component. Learn about the available props and the CSS API.

Import

import {Widget} from '@selfcommunity/react-ui';

Component Name

The name SCWidget can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCWidget-rootStyles applied to the root element.

Extends

Indexable

[p: string]: any

Other props

Properties

PropertyTypeDescriptionOverrides
actions?ReactNodeProp to pass an action to be rendered next to the skeleton-
className?stringOverrides or extends the styles applied to the component. Default nullWidgetProps.className
CourseProps?CoursePropsCourseProps-
skeletonsAnimation?false | "wave" | "pulse"Disable skeleton animation-
template?SCCourseTemplateTypeCourse template type Default 'preview'-

Functions

Course()

Course(inProps): Element

API documentation for the Community-JS Course component. Learn about the available props and the CSS API.

This component renders a course item. Take a look at our demo component here

Import

import {course} from '@selfcommunity/react-ui';

Component Name

The name SCCourse can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCCourses-rootStyles applied to the root element.
chip.SCCourses-chipStyles applied to the chip element.
previewRoot.SCCourses-preview-rootStyles applied to the root element in the preview template.
previewActions.SCCourses-preview-actionsStyles applied to the actions section in the preview template.
previewAvatar.SCCourses-preview-avatarStyles applied to the avatar in the preview template.
previewCategory.SCCourses-preview-categoryStyles applied to the category element in the preview template.
previewCompletedStatus.SCCourses-preview-completed-statusStyles applied to indicate the completed status in the preview template.
previewContent.SCCourses-preview-contentStyles applied to the content section in the preview template.
previewCreator.SCCourses-preview-creatorStyles applied to the creator element in the preview template.
previewImage.SCCourses-preview-imageStyles applied to the image in the preview template.
previewImageWrapper.SCCourses-preview-image-wrapperStyles applied to the wrapper of the image in the preview template.
previewInfo.SCCourses-preview-infoStyles applied to the info section in the preview template.
previewName.SCCourses-preview-nameStyles applied to the name element in the preview template.
previewNameWrapper.SCCourses-preview-name-wrapperStyles applied to the name wrapper in the preview template.
previewProgress.SCCourses-preview-progressStyles applied to indicate the progress section in the preview template.
previewProgressBar.SCCourses-preview-progress-barStyles applied to the progress bar in the preview template.
snippetRoot.SCCourses-snippet-rootStyles applied to the root element in the snippet template.
snippetAvatar.SCCourses-snippet-avatarStyles applied to the avatar element in the snippet template.
snippetImage.SCCourses-snippet-imageStyles applied to the image element in the snippet template.

Parameters

ParameterTypeDescription
inPropsCourseProps

Returns

Element


CourseSkeleton()

CourseSkeleton(inProps): Element

API documentation for the Community-JS Course Skeleton component. Learn about the available props and the CSS API.

Import

import {CourseSkeleton} from '@selfcommunity/react-ui';

Component Name

The name SCCourse-skeleton-root can be used when providing style overrides in the theme.

CSS

Rule NameGlobal classDescription
root.SCCourse-skeleton-rootStyles applied to the root element.
image.SCCourse-skeleton-imageStyles applied to the image element.
action.SCCourse-skeleton-actionStyles applied to action section.

Parameters

ParameterType
inPropsCourseSkeletonProps

Returns

Element