UNPKG

@selfcommunity/react-ui

Version:

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

72 lines (67 loc) 2.4 kB
import { BoxProps } from '@mui/material'; import { SCEventLocationType, SCEventType } from '@selfcommunity/types'; import { EventAddressProps } from './EventAddress'; export interface EventFormProps extends BoxProps { /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Event Object * @default null */ event?: SCEventType; /** * Initial location * @default SCEventLocationType.PERSON */ presetLocation?: SCEventLocationType; /** * On success callback function * @default null */ onSuccess?: (data: SCEventType) => void; /** * On error callback function * @default null */ onError?: (error: any) => void; /** * Props to spread to EventAddress component * @default empty object */ EventAddressComponentProps?: Pick<EventAddressProps, 'locations'>; /** * Any other properties */ [p: string]: any; } /** *> API documentation for the Community-JS Event Form component. Learn about the available props and the CSS API. * #### Import ```jsx import {EventForm} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCEventForm` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCEventForm-root|Styles applied to the root element.| |active|.SCEventForm-active|Styles applied to the active element.| |title|.SCEventForm-title|Styles applied to the title element.| |cover|.SCEventForm-cover|Styles applied to the cover field.| |form|.SCEventForm-form|Styles applied to the form element.| |switch|.SCEventForm-switch|Styles applied to the switch element.| |switchLabel|.SCEventForm-switch-label|Styles applied to the switchLabel element.| |name|.SCEventForm-name|Styles applied to the name field.| |description|.SCEventForm-description|Styles applied to the description field.| |content|.SCEventForm-content|Styles applied to the element.| |privacySection|.SCEventForm-privacy-section|Styles applied to the privacy section.| |privacySectionInfo|.SCEventForm-privacy-section-info|Styles applied to the privacy info section.| |error|.SCEventForm-error|Styles applied to the error elements.| * @param inProps */ export default function EventForm(inProps: EventFormProps): JSX.Element;