diff --git a/src/components/commenting-status/commenting-status.jsx b/src/components/commenting-status/commenting-status.jsx new file mode 100644 index 000000000..30c514ff4 --- /dev/null +++ b/src/components/commenting-status/commenting-status.jsx @@ -0,0 +1,31 @@ +const classNames = require('classnames'); +const PropTypes = require('prop-types'); +const FlexRow = require('../../components/flex-row/flex-row.jsx'); +const React = require('react'); + + +require('./commenting-status.scss'); + +const CommentingStatus = props => ( +
+
+ + + + + {props.children} + +
+
+); + +CommentingStatus.propTypes = { + children: PropTypes.node, + className: PropTypes.string, + innerClassName: PropTypes.string +}; + +module.exports = CommentingStatus; diff --git a/src/components/commenting-status/commenting-status.scss b/src/components/commenting-status/commenting-status.scss new file mode 100644 index 000000000..9610a655a --- /dev/null +++ b/src/components/commenting-status/commenting-status.scss @@ -0,0 +1,23 @@ +@import "../../colors"; + +.commenting-status { + border: 1px solid $ui-blue-10percent; + border-radius: 8px; + padding: 1.75rem 3rem 2rem; + margin: .5rem 0 2.25rem; + background-color: $ui-blue-10percent; + width: 100%; + text-align: center; + + p { + margin-bottom: 0; + line-height: 1.75rem; + } + .bottom-text { + font-size: .875rem; + } + .status-icon-class { + width: 28px; + height: 28px; + } +} diff --git a/static/svgs/project/comment-status.svg b/static/svgs/project/comment-status.svg new file mode 100644 index 000000000..8b1c84b7b --- /dev/null +++ b/static/svgs/project/comment-status.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/unit/components/commenting-status.test.jsx b/test/unit/components/commenting-status.test.jsx new file mode 100644 index 000000000..a96c40c15 --- /dev/null +++ b/test/unit/components/commenting-status.test.jsx @@ -0,0 +1,33 @@ +const React = require('react'); +const {shallowWithIntl} = require('../../helpers/intl-helpers.jsx'); +const CommentingStatus = require('../../../src/components/commenting-status/commenting-status.jsx'); + +describe('CommentingStatus', () => { + test('Basic render', () => { + const component = shallowWithIntl( + + ); + expect(component.find('div.commenting-status').exists()).toBe(true); + expect(component.find('img.comment-status-icon').exists()).toBe(true); + }); + + test('ClassNames added', () => { + const component = shallowWithIntl( + + ); + expect(component.find('div.class1').exists()).toBe(true); + expect(component.find('div.class2').exists()).toBe(true); + }); + + test('Children added', () => { + const component = shallowWithIntl( + + + + ); + expect(component.find('img.myChildDiv').exists()).toBe(true); + }); +});