semantic-ui-react
Version:
The official Semantic-UI-React integration.
43 lines (34 loc) • 1.16 kB
JavaScript
import _extends from 'babel-runtime/helpers/extends';
import cx from 'classnames';
import React, { PropTypes } from 'react';
import { customPropTypes, getElementType, getUnhandledProps, META } from '../../lib';
/**
* A comment can contain an list of actions a user may perform related to this comment.
*/
function CommentActions(props) {
var className = props.className,
children = props.children;
var classes = cx('actions', className);
var rest = getUnhandledProps(CommentActions, props);
var ElementType = getElementType(CommentActions, props);
return React.createElement(
ElementType,
_extends({}, rest, { className: classes }),
children
);
}
CommentActions.handledProps = ['as', 'children', 'className'];
CommentActions._meta = {
name: 'CommentActions',
parent: 'Comment',
type: META.TYPES.VIEW
};
process.env.NODE_ENV !== "production" ? CommentActions.propTypes = {
/** An element type to render as (string or function). */
as: customPropTypes.as,
/** Primary content. */
children: PropTypes.node,
/** Additional classes. */
className: PropTypes.string
} : void 0;
export default CommentActions;