Content Header
Description
The Content Header
component is used to display the title
, description
, and image
of a Course or Learning Path. All content types, except learning paths, can also display rating
and ratingsCount
information.
✨🎨 View Component in Storybook 🎨✨
Installation
- npm
- Yarn
npm install @thoughtindustries/content
yarn add @thoughtindustries/content
Props
Name | Required | Type | Description |
---|---|---|---|
contentKind | Yes | string | The contentKind of the Content, e.g., learningPath , course . |
slug | Yes | slug | The slug of the content that should be displayed. |
showStars | No | boolean | Controls whether a course's rating is displayed, shown in stars. |
showImage | No | boolean | Controls whether a piece of content's Detail Image is displayed. |
Example code
import { ContentHeader } from '@thoughtindustries/content';
export function MyComponent() {
// ...
return (
<ContentHeader
contentKind={contentKind}
slug={courseSlug}
showStars={true}
showImage={true}
/>
);
}