@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
72 lines (62 loc) • 2.27 kB
TypeScript
import { SCPrivateMessageThreadType } from '@selfcommunity/types';
export interface PrivateMessageThreadItemProps {
/**
* Overrides or extends the styles applied to the component.
* @default null
*/
className?: string;
/**
* PrivateMessageItem Object
* @default null
*/
message?: SCPrivateMessageThreadType;
/**
* Mouse Events to spread to the element
*/
mouseEvents?: {
onMouseEnter?: () => void;
onMouseLeave?: () => void;
};
/**
* Gets mouse hovering status
* @default null
*/
isHovering?: () => void;
/**
* Menu icon showed only for messages sent by logged user
* @default false
*/
showMenuIcon?: boolean;
/**
* Action triggered on menu icon click
* @default null
*/
onMenuIconClick?: () => void;
/**
* Any other properties
*/
[p: string]: any;
}
/**
* > API documentation for the Community-JS PrivateMessageItem component. Learn about the available props and the CSS API.
#### Import
```jsx
import {PrivateMessageThreadItem} from '@selfcommunity/react-ui';
```
#### Component Name
The name `SCPrivateMessageThreadItem` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.SCPrivateMessageThreadItem-root|Styles applied to the root element.|
|text|.SCPrivateMessageThreadItem-text|Styles applied to the message text element.|
|img|.SCPrivateMessageThreadItem-img|Styles applied to the img element.|
|document|.SCPrivateMessageThreadItem-document|Styles applied to the message file element.|
|video|.SCPrivateMessageThreadItem-video|Styles applied to the message video element.|
|other|.SCPrivateMessageThreadItem-other|Styles applied to other media type element.|
|messageTime|.SCPrivateMessageThreadItem-message-time|Styles applied to the thread message time element.|
|menuItem|.SCPrivateMessageThreadItem-menu-item|Styles applied to the thread message menu item element.|
|dialogRoot|.SCPrivateMessageThreadItem-dialog-root|Styles applied to dialog root element.|
* @param inProps
*/
export default function PrivateMessageThreadItem(inProps: PrivateMessageThreadItemProps): JSX.Element;