@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
80 lines (75 loc) • 3.28 kB
TypeScript
import { BoxProps } from '@mui/material';
import { SCCourseType } from '@selfcommunity/types';
import { SCCourseFormStepType } from '../../constants/Course';
export interface CourseFormProps extends BoxProps {
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* Course Object
* @default null
*/
course?: SCCourseType;
/**
* On success callback function
* @default null
*/
onSuccess?: (data: SCCourseType) => void;
/**
* step name
* @default `SCCourseFormStepType.GENERAL`
*/
step?: SCCourseFormStepType;
/**
* On step change callback function
* @default null
*/
onStepChange?: (step: SCCourseFormStepType, type: SCCourseType) => void;
/**
* On error callback function
* @default null
*/
onError?: (error: any) => void;
/**
* Hide paywalls configuration
* @default false
*/
hidePaywalls?: boolean;
/**
* Any other properties
*/
[p: string]: any;
}
/**
*> API documentation for the Community-JS Course Form component. Learn about the available props and the CSS API.
*
#### Import
```jsx
import {CourseForm} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCCourseForm` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
| root | .SCCourseForm-root | Styles applied to the root element. |
| actions | .SCCourseForm-actions | Styles applied to the actions element. |
| card | .SCCourseForm-card | Styles applied to the card element. |
| content | .SCCourseForm-content | Styles applied to the content element. |
| cover | .SCCourseForm-cover | Styles applied to the cover element. |
| description | .SCCourseForm-description | Styles applied to the description element. |
| error | .SCCourseForm-error | Styles applied to the error element. |
| form | .SCCourseForm-form | Styles applied to the form element. |
| frequency | .SCCourseForm-frequency | Styles applied to the frequency element. |
| name | .SCCourseForm-name | Styles applied to the name element. |
| privacySection | .SCCourseForm-privacy-section | Styles applied to the privacy section. |
| privacySectionInfo | .SCCourseForm-privacy-section-info | Styles applied to the privacy section info. |
| selected | .SCCourseForm-selected | Styles applied to the selected element. |
| stepOne | .SCCourseForm-step-one | Styles applied to the step-one element. |
| stepTwo | .SCCourseForm-step-two | Styles applied to the step-two element. |
| title | .SCCourseForm-title | Styles applied to the title element. |
* @param inProps
*/
export default function CourseForm(inProps: CourseFormProps): JSX.Element;