UNPKG

@selfcommunity/react-ui

Version:

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

72 lines (71 loc) 2.06 kB
import { CommentsObjectProps } from '../../CommentsObject'; import { CommentObjectProps } from '../../CommentObject'; import { SCFeedObjectActivitiesType } from '../../../types/feedObject'; import { SCCommentType, SCContributionType, SCFeedObjectType } from '@selfcommunity/types'; import { CacheStrategies } from '@selfcommunity/utils'; export interface ActivitiesProps { /** * Id of the FeedObjectActivities * @default `feed_object_activities_<feedObjectId | feedObject.id>` */ id?: string; /** * Overrides or extends the styles applied to the component. * @default null */ className?: string; /** * Id of feed object * @default null */ feedObjectId?: number; /** * Feed object * @default null */ feedObject?: SCFeedObjectType; /** * Type of feed object * @default SCContributionType.POST */ feedObjectType?: Exclude<SCContributionType, SCContributionType.COMMENT>; /** * Feed Object latest activities * @default null */ feedObjectActivities?: any[]; /** * Comments (if new) * @default [] */ comments?: SCCommentType[]; /** * Activities type * @default SCFeedObjectActivitiesType.RECENT_COMMENTS */ activitiesType?: SCFeedObjectActivitiesType; /** * Callback change activities type */ onSetSelectedActivities?: (type: SCFeedObjectActivitiesType) => void; /** * Props to spread to comments object skeleton * @default {elevation: 0, WidgetProps: {variant: 'outlined'} as WidgetProps} */ CommentsObjectProps?: CommentsObjectProps; /** * Props to spread to comments object skeleton * @default {variant: 'oulined'} */ CommentComponentProps?: CommentObjectProps; /** * Caching strategies * @default CacheStrategies.CACHE_FIRST */ cacheStrategy?: CacheStrategies; /** * Other props */ [p: string]: any; } export default function Activities(props: ActivitiesProps): JSX.Element;