@selfcommunity/react-ui
Version:
React UI Components to integrate a Community created with SelfCommunity Platform.
73 lines (64 loc) • 2.06 kB
TypeScript
import { WidgetProps } from '../Widget';
export interface CommentObjectReplyProps extends WidgetProps {
/**
* Bind focus on mount
* @default false
*/
autoFocus?: boolean;
/**
* Callback invoked after reply
* @param comment
*/
onReply?: (comment: any) => void;
/**
* Callback invoked after save/edit
* @param comment
*/
onSave?: (comment: any) => void;
/**
* Callback invoked after disccard save/edit
* @param comment
*/
onCancel?: () => void;
/**
* Disable component
* @default true
*/
editable?: boolean;
/**
* Initial content
* @default ''
*/
text?: string;
/**
* Initial content
* @default {variant: 'outlined'}
*/
WidgetProps?: WidgetProps;
/**
* Other props
*/
[p: string]: any;
}
/**
*> API documentation for the Community-JS Comment Object Reply component. Learn about the available props and the CSS API.
#### Import
```jsx
import {CommentObjectReply} from '@selfcommunity/react-ui';
```
#### Component Name
The name `CommentObjectReply` can be used when providing style overrides in the theme.
#### CSS
|Rule Name|Global class|Description|
|---|---|---|
|root|.CommentObjectReply-root|Styles applied to the root element.|
|comment|.SCCommentObjectReply-comment|Styles applied to comment element.|
|hasValue|.SCCommentObjectReply-has-value|Styles applied to the comment element when editor is not empty.|
|avatar|.SCCommentObjectReply-avatar|Styles applied to the avatar element.|
|actions|.SCCommentObjectReply-actions|Styles applied to the actions section.|
|buttonReply|.SCCommentObjectReply-button-reply|Styles applied to reply button element.|
|buttonSave|.SCCommentObjectReply-button-save|Styles applied to save button element.|
|buttonCancel|.SCCommentObjectReply-button-cancel|Styles applied to the cancel button element.|
* @param inProps
*/
export default function CommentObjectReply(inProps: CommentObjectReplyProps): JSX.Element;