diff --git a/.eslintrc b/.eslintrc index f89062a03..bb5289c87 100644 --- a/.eslintrc +++ b/.eslintrc @@ -24,6 +24,7 @@ parser: babel-eslint env: browser: true commonjs: true + es6: true extends: - eslint:recommended - plugin:react/recommended diff --git a/actions.js b/actions.js index 74949ba98..4411336ef 100644 --- a/actions.js +++ b/actions.js @@ -1,5 +1,11 @@ -export const SELECT_TAG = 'SELECT_TAG' +export let SELECT_TAG = 'SELECT_TAG' export function selectTag(tagName, tagValue) { return {type: SELECT_TAG, tagName, tagValue} } + +export let SELECT_VARIABLE = 'SELECT_VARIABLE' + +export function selectVariable(name) { + return {type: SELECT_VARIABLE, name} +} diff --git a/components/SelectedVariable.js b/components/SelectedVariable.js new file mode 100644 index 000000000..4836036ee --- /dev/null +++ b/components/SelectedVariable.js @@ -0,0 +1,30 @@ +import React, { Component } from 'react' + +export default class SelectedVariable extends Component { + render() { + let { + variable: { + name, + first: { + description + }, + tags + }, + selectedTags + } = this.props + return ( +
+

{name}

+

{description}

+ +
) + } +} diff --git a/components/TagNavigation.js b/components/TagNavigation.js index 2a2fdd5e6..5c1f77da2 100644 --- a/components/TagNavigation.js +++ b/components/TagNavigation.js @@ -8,7 +8,7 @@ export default class TagNavigation extends React.Component {
{selectedTags.length > 0 &&