@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
64 lines (55 loc) • 1.79 kB
TypeScript
import { SCPrivateMessageType } from '@selfcommunity/types';
export interface PrivateMessageComponentProps {
/**
* Thread receiver id
* @default null
*/
id?: number | string;
/**
* Thread type
* @default null
*/
type?: SCPrivateMessageType;
/**
* Handler on message click
* @default null
*/
onItemClick?: (id: any, type: any) => void;
/**
* Handler on single message open
* @default null
*/
onSingleMessageOpen?: (id: any) => void;
/**
* Handler on thread back
* @default null
*/
onThreadBack?: () => void;
/**
* Any other properties
*/
[p: string]: any;
}
/**
*
* > API documentation for the Community-JS Private Messages component. Learn about the available props and the CSS API.
*
*
* This component renders the private messages section.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/PrivateMessages)
#### Import
```jsx
import {PrivateMessageComponent} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCPrivateMessageComponent` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCPrivateMessageComponent-root|Styles applied to the root element.|
|snippetsBox|.SCPrivateMessageComponent-snippets-box|Styles applied to the snippets box element.|
|threadBox|.SCPrivateMessageComponent-thread-box|Styles applied to the thread box element.|
|hide|.SCPrivateMessageComponent-hide|Styles applied to the snippetBox or threadBox grid item element on mobile view.|
* @param inProps
*/
export default function PrivateMessageComponent(inProps: PrivateMessageComponentProps): JSX.Element;