new component Selected
This commit is contained in:
parent
6c99c85993
commit
a7884d9a3b
4 changed files with 42 additions and 0 deletions
10
src/css/Components/selected.css
Normal file
10
src/css/Components/selected.css
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#selectedBox{
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
#selectedTxt{
|
||||||
|
color : white;
|
||||||
|
text-align: center;
|
||||||
|
font-family: 'Wellfleet', cursive;
|
||||||
|
font-size:2vw
|
||||||
|
}
|
|
@ -7,6 +7,12 @@
|
||||||
display:flex
|
display:flex
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#selectedBlock{
|
||||||
|
display:flex;
|
||||||
|
justify-content:center;
|
||||||
|
margin-top:3vh;
|
||||||
|
}
|
||||||
|
|
||||||
#articleBlock{
|
#articleBlock{
|
||||||
display:flex;
|
display:flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
22
src/js/Components/Selected.js
Normal file
22
src/js/Components/Selected.js
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
import React, { Component } from 'react';
|
||||||
|
import '../../css/Components/selected.css'
|
||||||
|
|
||||||
|
class Selected extends Component {
|
||||||
|
|
||||||
|
constructor(props){
|
||||||
|
super(props)
|
||||||
|
this.state = {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div id="selectedBox">
|
||||||
|
<p id="selectedTxt">Vous avez sélectionné 3 articles</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Selected;
|
|
@ -16,6 +16,7 @@ import Categories from '../Components/Categories';
|
||||||
import EditCategory from '../Components/EditCategory';
|
import EditCategory from '../Components/EditCategory';
|
||||||
import Sort from '../Components/Sort';
|
import Sort from '../Components/Sort';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import Selected from '../Components/Selected';
|
||||||
|
|
||||||
export default class Stock extends React.Component {
|
export default class Stock extends React.Component {
|
||||||
|
|
||||||
|
@ -197,6 +198,9 @@ sortArticles = (sortType) => {
|
||||||
<div id="sortBlock">
|
<div id="sortBlock">
|
||||||
<Sort handleChangeSortType={this.handleChangeSortType}/>
|
<Sort handleChangeSortType={this.handleChangeSortType}/>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="selectedBlock">
|
||||||
|
<Selected/>
|
||||||
|
</div>
|
||||||
<div id="articleBlock">
|
<div id="articleBlock">
|
||||||
{this.state.articles && this.state.articles[0] ?
|
{this.state.articles && this.state.articles[0] ?
|
||||||
this.state.onSortedCategories ?
|
this.state.onSortedCategories ?
|
||||||
|
|
Loading…
Reference in a new issue