UNPKG

@selfcommunity/react-ui

Version:

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

68 lines (62 loc) 2.28 kB
import { SCCategoryType, SCEventType, SCFeedTypologyType, SCGroupType, SCMediaType, SCPollType, SCTagType } from '@selfcommunity/types'; import { SCMediaObjectType } from '../../types/media'; import { WidgetProps } from '../Widget'; export interface InlineComposerWidgetProps extends Omit<WidgetProps, 'defaultValue'> { /** * Media objects available * @default Image, Document, Link */ mediaObjectTypes?: SCMediaObjectType[]; /** * Initialization Data for the Composer, this is a hook to generate custom posts * @default null */ defaultValue?: { title?: string; text?: string; categories?: SCCategoryType[]; event?: SCEventType; group?: SCGroupType; audience?: string; addressing?: SCTagType[]; medias?: SCMediaType[]; poll?: SCPollType; location?: string; }; /** * Callback triggered on success contribution creation * @default null */ onSuccess?: (res: any) => void; /** * The label showed inside the composer */ label?: any; /** * The feed where the component is rendered * @default SCFeedTypologyType.HOME */ feedType?: SCFeedTypologyType; } /** * > API documentation for the Community-JS Inline Composer component. Learn about the available props and the CSS API. * * * This component renders This component renders the section used for feed objects creation * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/InlineComposer) #### Import ```jsx import {InlineComposerWidget} from '@selfcommunity/react-ui'; ``` #### Component Name The name `SCInlineComposerWidget` can be used when providing style overrides in the theme. #### CSS |Rule Name|Global class|Description| |---|---|---| |root|.SCInlineComposerWidget-root|Styles applied to the root element.| |content|.SCInlineComposerWidget-content|Styles applied to the content element.| |input|.SCInlineComposerWidget-input|Styles applied to the input element.| |avatar|.SCInlineComposerWidget-avatar|Styles applied to the avatar element.| * @param inProps */ export default function InlineComposerWidget(inProps: InlineComposerWidgetProps): JSX.Element;