import {FilterButtonGroup, FilterField} from '@components';
import {Card, Row} from 'antd';
import {FC} from 'react';
import {useField, useHandle} from './hooks';

const Filter: FC = function() {
  const [value, onChange] = useField();
  const {onSearch} = useHandle(value);

  return (
    <Card>
      <Row>
        <FilterField name='menuName' label='菜单名称' value={value} onChange={onChange} />
        <FilterButtonGroup onSearch={onSearch} offset={12} />
      </Row>
    </Card>
  );
};

export default Filter;
