diff --git a/src/css/Components/articles.css b/src/css/Components/articles.css index b118035..800cc35 100644 --- a/src/css/Components/articles.css +++ b/src/css/Components/articles.css @@ -1,7 +1,7 @@ #articleContainer{ display:flex; justify-content:center; - margin-top:5vw; + margin-top:2vw; margin-bottom:5vw } diff --git a/src/css/Components/selected.css b/src/css/Components/selected.css index d9581c6..213d614 100644 --- a/src/css/Components/selected.css +++ b/src/css/Components/selected.css @@ -1,5 +1,9 @@ #selectedBox{ display: flex; + height:5vh; + flex-direction: column; + justify-content: center; + align-items: center; } #selectedTxt{ @@ -7,4 +11,9 @@ text-align: center; font-family: 'Wellfleet', cursive; font-size:2vw +} + +#selectedActions{ + display: flex; + flex-direction:row; } \ No newline at end of file diff --git a/src/js/Components/ArticleDetails.js b/src/js/Components/ArticleDetails.js index f52dd7f..343fafe 100644 --- a/src/js/Components/ArticleDetails.js +++ b/src/js/Components/ArticleDetails.js @@ -87,6 +87,11 @@ class ArticleDetails extends React.Component { if ((e.target.id !== "categoryIcon") && (e.target.id !== "penblue") && (e.target.id !== "crossred") && (e.target.id !== "") && (e.target.id !== "bluepen") && (e.target.id !== "redcross") && (e.target.id !== "no")){ this.setState({selected:!this.state.selected},()=>{ console.log(this.state.selected) + if (this.state.selected){ + this.props.select() + } else { + this.props.deselect() + } }) } } diff --git a/src/js/Components/Articles.js b/src/js/Components/Articles.js index 614fe0e..88215ce 100644 --- a/src/js/Components/Articles.js +++ b/src/js/Components/Articles.js @@ -14,13 +14,14 @@ class Articles extends React.Component { } + render() { return (
Vous avez sélectionné 3 articles
+ {this.props.counter ? + <> +Vous avez sélectionné {this.props.counter} articles
+