Create Narrative card

This commit is contained in:
Franc Camps-Febrer
2018-12-05 11:54:22 +00:00
parent 2dd83ecee5
commit 38eca7110c
9 changed files with 163 additions and 10 deletions

View File

@@ -34,19 +34,27 @@ class Toolbar extends React.Component {
if (this.props.features.USE_SEARCH) {
return (
<TabPanel>
<Search
language={this.props.language}
tags={this.props.tags}
categories={this.props.categories}
tagFilters={this.props.tagFilters}
categoryFilters={this.props.categoryFilters}
filter={this.props.filter}
/>
<Search
language={this.props.language}
tags={this.props.tags}
categories={this.props.categories}
tagFilters={this.props.tagFilters}
categoryFilters={this.props.categoryFilters}
filter={this.props.filter}
/>
</TabPanel>
)
}
}
goToNarrative(narrative) {
this.setState({
tabNum: -1
}, () => {
this.props.actions.updateNarrative(narrative);
});
}
renderToolbarNarrativePanel() {
return (
<TabPanel>
@@ -55,7 +63,7 @@ class Toolbar extends React.Component {
{this.props.narratives.map((narr) => {
return (
<div className="panel-action action">
<button style={{ backgroundColor: '#000' }}>
<button style={{ backgroundColor: '#000' }} onClick={() => { this.goToNarrative(narr); }}>
<p>{narr.label}</p>
<p><small>{narr.description}</small></p>
</button>