diff --git a/actions.js b/actions.js index 4411336ef..5856a1a0d 100644 --- a/actions.js +++ b/actions.js @@ -1,9 +1,17 @@ +/* TAGS */ export let SELECT_TAG = 'SELECT_TAG' export function selectTag(tagName, tagValue) { return {type: SELECT_TAG, tagName, tagValue} } +export let RESET_TAGS = 'RESET_TAGS' + +export function resetTags() { + return {type: RESET_TAGS} +} + +/* VARIBALES */ export let SELECT_VARIABLE = 'SELECT_VARIABLE' export function selectVariable(name) { diff --git a/components/TagNavigation.js b/components/TagNavigation.js index 5c1f77da2..600eb9671 100644 --- a/components/TagNavigation.js +++ b/components/TagNavigation.js @@ -3,23 +3,29 @@ import React from 'react' export default class TagNavigation extends React.Component { render(){ - let {tagsToSelect, selectedTags, selectTag} = this.props + let {tagsToSelect, selectedTags, selectTag, resetTags} = this.props return (
- {selectedTags.length > 0 && -
) } @@ -29,10 +35,15 @@ class Tag extends React.Component { render(){ let {tag: {name, choices, number}, selectTag} = this.props return (
  • - {`${name} (${number} variables)`} + + {name} + + ({number} variables) + +