1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 18:56:22 +00:00

rename config.tag to config.coloredTags

This commit is contained in:
HarlanLuo
2018-12-28 11:13:05 +08:00
parent 3e645db324
commit 6367be213f
9 changed files with 37 additions and 33 deletions

View File

@@ -437,7 +437,7 @@ class MarkdownNoteDetail extends React.Component {
showTagsAlphabetically={config.ui.showTagsAlphabetically}
data={data}
onChange={this.handleUpdateTag.bind(this)}
tagConfig={config.tag}
coloredTags={config.coloredTags}
/>
<TodoListPercentage onClearCheckboxClick={(e) => this.handleClearTodo(e)} percentageOfTodo={getTodoPercentageOfCompleted(note.content)} />
</div>

View File

@@ -788,7 +788,7 @@ class SnippetNoteDetail extends React.Component {
showTagsAlphabetically={config.ui.showTagsAlphabetically}
data={data}
onChange={(e) => this.handleChange(e)}
tagConfig={config.tag}
coloredTags={config.coloredTags}
/>
</div>
<div styleName='info-right'>

View File

@@ -179,14 +179,14 @@ class TagSelect extends React.Component {
}
render () {
const { value, className, showTagsAlphabetically, tagConfig } = this.props
const { value, className, showTagsAlphabetically, coloredTags } = this.props
const tagList = _.isArray(value)
? (showTagsAlphabetically ? _.sortBy(value) : value).map((tag) => {
return (
<span styleName='tag'
key={tag}
style={{backgroundColor: tagConfig[tag]}}
style={{backgroundColor: coloredTags[tag]}}
>
<span styleName='tag-label' onClick={(e) => this.handleTagLabelClick(tag)}>#{tag}</span>
<button styleName='tag-removeButton'
@@ -242,7 +242,7 @@ TagSelect.propTypes = {
className: PropTypes.string,
value: PropTypes.arrayOf(PropTypes.string),
onChange: PropTypes.func,
tagConfig: PropTypes.object
coloredTags: PropTypes.object
}
export default CSSModules(TagSelect, styles)