@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
74 lines (65 loc) • 2.22 kB
TypeScript
import { CardProps } from '@mui/material';
import { SCPrivateMessageSnippetType, SCPrivateMessageType } from '@selfcommunity/types';
export interface PrivateMessageSnippetsProps extends CardProps {
/**
* Snippets list
* @default[]
*/
snippets?: SCPrivateMessageSnippetType[];
/**
* Loading state
*
*/
loading?: boolean;
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
*
*/
snippetActions?: {
onSnippetClick?: (msg: any, type: any) => void;
onNewMessageClick?: () => void;
onDeleteConfirm?: (msg: any) => void;
};
/**
* Any other properties
*/
[p: string]: any;
/**
* thread user/ group object
* @default null
*/
threadObj?: any;
/**
* Thread type
* @default SCPrivateMessageType.USER
*/
type?: SCPrivateMessageType;
}
/**
* > API documentation for the Community-JS PrivateMessageSnippets component. Learn about the available props and the CSS API.
*
*
* This component renders the list of conversations preview between users.
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Snippets)
#### Import
```jsx
import {PrivateMessageSnippets} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCPrivateMessageSnippets` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCPrivateMessageSnippets-root|Styles applied to the root element.|
|icon|.SCPrivateMessageSnippets-icon|Styles applied to the search icon element.|
|input|.SCPrivateMessageSnippets-input|Styles applied to the search input element.|
|clear|.SCPrivateMessageSnippets-clear|Styles applied to the search bar clear icon element.|
|searchBar|.SCPrivateMessageSnippets-searchBar|Styles applied to the search bar element.|
|newMessageButton|.SCPrivateMessageSnippets-new-message-button|Styles applied to new message button element.|
* @param inProps
*/
export default function PrivateMessageSnippets(inProps: PrivateMessageSnippetsProps): JSX.Element;