import React from 'react'; import cn from 'classnames'; import { Text } from '@veeqo/ui'; import { IncludedFilter, Shared, ViewName } from '../../types'; import IncludedFilters from '../IncludedFilters'; import { Dropdown, Icon, Header, Field, Content, Bottom, Button, Info, SharingOptionsContainer, SharingOptions, } from './styled'; import DefaultOption from './DefaultOption'; type SharingOptionsType = { key: 'personal' | 'company'; label: 'Personal' | 'Company'; value: Shared; }; const sharingOptions: SharingOptionsType[] = [ { key: 'personal', label: 'Personal', value: 'false' }, { key: 'company', label: 'Company', value: 'true' }, ]; type EditDropdownPropsType = { className: string; viewName: ViewName; includedFilters: IncludedFilter[]; shouldShowDropdown: boolean; headerText: string; shared: Shared; isDefault: boolean; onChange: (value: string) => void; onCloseDropdown: () => void; onSave: (editable: boolean) => void; onDelete: () => void; onSharingOptionChange: (shared: Shared) => void; handleChangeIsDefault: (isDefault: boolean) => void; }; const EditDropdown = ({ className, viewName, includedFilters, headerText, onChange, shared, isDefault, shouldShowDropdown, onCloseDropdown, onSave, onDelete, onSharingOptionChange, handleChangeIsDefault, }: EditDropdownPropsType) => (
{headerText}
Filter searches and how they are sorted will be saved as a new view in your list. Sharing options onSharingOptionChange(value as Shared)} /> handleChangeIsDefault(state)} />
); export default EditDropdown;