mirror of
https://github.com/hsokolowski/iTree.git
synced 2026-06-11 14:24:17 -04:00
36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import React from 'react';
|
|
import { Input, Stack } from '@chakra-ui/react';
|
|
import { ChevronLeftIcon } from '@chakra-ui/icons';
|
|
import { Search as SearchBar } from '../../SearchBar';
|
|
import './alg-style.scss';
|
|
import { useAttributesContext } from '../../../contexts/AttributesContext';
|
|
|
|
export default function TabTSP({ attribute, value, changeValues }) {
|
|
const { attributes: options } = useAttributesContext();
|
|
|
|
const onAttributeChange = value => changeValues({ attribute: value });
|
|
const onPivotChange = value => changeValues({ pivot: value });
|
|
|
|
return (
|
|
<Stack spacing={3} direction="row">
|
|
{/* <div className="alg-search"> */}
|
|
<SearchBar
|
|
value={attribute}
|
|
onChange={onAttributeChange}
|
|
options={options}
|
|
multiple={false}
|
|
closeOnSelect={true}
|
|
/>
|
|
{/* </div> */}
|
|
<ChevronLeftIcon w={10} h={10} />
|
|
<SearchBar
|
|
value={value}
|
|
onChange={onPivotChange}
|
|
options={options}
|
|
multiple={false}
|
|
closeOnSelect={true}
|
|
/>
|
|
</Stack>
|
|
);
|
|
}
|