@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
91 lines (81 loc) • 2.35 kB
TypeScript
import { SCEventType } from '@selfcommunity/types';
import React from 'react';
import { SCEventTemplateType } from '../../types/event';
import { EventParticipantsButtonProps } from '../EventParticipantsButton';
import { WidgetProps } from '../Widget';
import { EventSkeletonProps } from './Skeleton';
export interface EventProps extends WidgetProps {
/**
* Event Object
* @default null
*/
event?: SCEventType;
/**
* Id of the event for filter the feed
* @default null
*/
eventId?: number;
/**
* Event template type
* @default 'preview'
*/
template?: SCEventTemplateType;
/**
* Actions
* @default null
*/
actions?: React.ReactNode;
/**
* Hide in progress
* @default false
*/
hideInProgress?: boolean;
/**
* Hide participants
* @default false
*/
hideEventParticipants?: boolean;
/**
* Props to spread to EventParticipantsButton component
* @default {}
*/
EventParticipantsButtonComponentProps?: EventParticipantsButtonProps;
/**
* Hide event planner
* @default false
*/
hideEventPlanner?: boolean;
/**
* Props to spread to EventSkeleton component
* @default {}
*/
EventSkeletonComponentProps?: EventSkeletonProps;
/**
* Any other properties
*/
[p: string]: any;
}
/**
* > API documentation for the Community-JS Event component. Learn about the available props and the CSS API.
*
*
* This component renders an event item.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Event)
#### Import
```jsx
import {event} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCEvent` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCEvent-root|Styles applied to the root element.|
|avatar|.SCEvent-avatar|Styles applied to the avatar element.|
|primary|.SCEvent-primary|Styles applied to the primary item element section|
|secondary|.SCEvent-secondary|Styles applied to the secondary item element section|
|actions|.SCEvent-actions|Styles applied to the actions section.|
*
* @param inProps
*/
export default function Event(inProps: EventProps): JSX.Element;