+
+
+
+
+
+ );
+ }
+}
+
+TagSelector.propTypes = {
+ tags: PropTypes.arrayOf(PropTypes.shape({
+ name: PropTypes.string,
+ selected: PropTypes.bool,
+ color: PropTypes.string,
+ disabled: PropTypes.bool
+ })),
+ searchString: PropTypes.string,
+ shouldFocus: PropTypes.bool,
+ onSelect: PropTypes.func,
+ onTagContext: PropTypes.func,
+ onSearch: PropTypes.func,
+ onSettings: PropTypes.func,
+};
+
+TagSelector.defaultProps = {
+ tags: [],
+ searchString: '',
+ shouldFocus: false,
+ onSelect: () => Promise.resolve(),
+ onTagContext: () => Promise.resolve(),
+ onSearch: () => Promise.resolve(),
+ onSettings: () => Promise.resolve()
+};
+
+module.exports = TagSelector;
diff --git a/resource/react-ui/components/tag-selector/tag-list.jsx b/resource/react-ui/components/tag-selector/tag-list.jsx
new file mode 100644
index 0000000000..9c14b078dd
--- /dev/null
+++ b/resource/react-ui/components/tag-selector/tag-list.jsx
@@ -0,0 +1,55 @@
+const React = require('react');
+const PropTypes = require('prop-types');
+const cx = require('classnames');
+
+class TagList extends React.PureComponent {
+ renderTag(index) {
+ const { tags } = this.props;
+ const tag = index < tags.length ?
+ tags[index] : {
+ tag: "",
+ };
+
+ const className = cx('tag-selector-item', {
+ selected: tag.selected,
+ colored: tag.color,
+ });
+
+ let props = {
+ className,
+ onClick: ev => this.props.onSelect(tag.name, ev),
+ onContextMenu: ev => this.props.onTagContext(tag, ev),
+ };
+
+ if(tag.color) {
+ props['style'] = {
+ color: tag.color,
+ };
+ }
+
+
+ return (
+