UNPKG

@selfcommunity/react-ui

Version:

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

41 lines (40 loc) 1.23 kB
import { SCContributionType } from '@selfcommunity/types'; /** * From obj extract type of the contribution * @param obj */ export declare function getContributionType(obj: any): SCContributionType; /** * From obj extract the contribution * @param obj */ export declare function getContribution(obj: any): any; /** * Get a snippet for a contribution * @param obj (Discussion, Post, Status, Comment) */ export declare function getContributionSnippet(obj: any): any; /** * Get the contribution text * Hydrate text with mention, etc. * @param html Html of the contribution * @param handleUrl Func that handle urls */ export declare function getContributionHtml(html: any, handleUrl: any): any; /** * Get the contribution text for comment object * Hydrate text with mention, etc. * @param html Html of the contribution * @param handleUrl Func that handle urls */ export declare function getCommentContributionHtml(html: any, handleUrl: any): any; /** * Get route name for a contribution * @param obj */ export declare function getContributionRouteName(obj: any): any; /** * Get data for scRoutingContext.url() * @param obj (Discussion, Post, Status, Comment) */ export declare function getRouteData(obj: any): {};