Last change
on this file since 0f5aa27 was 07f4e8b, checked in by darsov2 <62809499+darsov2@…>, 8 months ago |
prefinal fixes
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | import React from "react";
|
---|
2 | import Dropdown from 'react-bootstrap/Dropdown';
|
---|
3 | import { BsSortUp } from "react-icons/bs"
|
---|
4 |
|
---|
5 | const SortButton = (props) => {
|
---|
6 | return (
|
---|
7 | <Dropdown onSelect={(event, x) => {
|
---|
8 | console.log(event)
|
---|
9 | props.setSortingArg(event)
|
---|
10 | }}>
|
---|
11 | <Dropdown.Toggle variant="success" id="dropdown-basic" size="lg">
|
---|
12 | <span className="ikona my-1"><BsSortUp/></span>
|
---|
13 | <span className="ikona mx-3">Сортирај</span>
|
---|
14 | </Dropdown.Toggle>
|
---|
15 |
|
---|
16 | <Dropdown.Menu >
|
---|
17 | {props.type !== 'restaurant' && <Dropdown.Item eventKey={'priceDesc'}>Цена растечки</Dropdown.Item>}
|
---|
18 | {props.type !== 'restaurant' && <Dropdown.Item eventKey={'priceAsc'}>Цена опаѓачки</Dropdown.Item>}
|
---|
19 | {props.type !== 'transport' && <Dropdown.Item eventKey={'nameAsc'}>Име растечки</Dropdown.Item>}
|
---|
20 | {props.type !== 'transport' && <Dropdown.Item eventKey={'nameDesc'}>Име опаѓачки</Dropdown.Item>}
|
---|
21 | </Dropdown.Menu>
|
---|
22 | </Dropdown>
|
---|
23 | );
|
---|
24 | }
|
---|
25 |
|
---|
26 |
|
---|
27 | export default SortButton; |
---|
Note:
See
TracBrowser
for help on using the repository browser.