Icon refactoring (#287)

* Refactor icons

* Fix additional icons
This commit is contained in:
Félix Malfait
2023-06-14 07:55:54 +02:00
committed by GitHub
parent 7e73f013d1
commit 830b76cd9a
34 changed files with 194 additions and 161 deletions

View File

@ -1,13 +1,12 @@
import {
TbBuilding,
TbCalendar,
TbMail,
TbMapPin,
TbPhone,
TbUser,
} from 'react-icons/tb';
import { SortType } from '@/filters-and-sorts/interfaces/sorts/interface';
import {
IconBuilding,
IconCalendar,
IconMail,
IconMapPin,
IconPhone,
IconUser,
} from '@/ui/icons/index';
import {
PersonOrderByWithRelationInput as People_Order_By,
SortOrder as Order_By,
@ -17,7 +16,7 @@ export const availableSorts = [
{
key: 'fullname',
label: 'People',
icon: <TbUser size={16} />,
icon: <IconUser size={16} />,
_type: 'custom_sort',
orderByTemplates: [
(order: Order_By) => ({
@ -31,32 +30,32 @@ export const availableSorts = [
{
key: 'company_name',
label: 'Company',
icon: <TbBuilding size={16} />,
icon: <IconBuilding size={16} />,
_type: 'custom_sort',
orderByTemplates: [(order: Order_By) => ({ company: { name: order } })],
},
{
key: 'email',
label: 'Email',
icon: <TbMail size={16} />,
icon: <IconMail size={16} />,
_type: 'default_sort',
},
{
key: 'phone',
label: 'Phone',
icon: <TbPhone size={16} />,
icon: <IconPhone size={16} />,
_type: 'default_sort',
},
{
key: 'createdAt',
label: 'Created at',
icon: <TbCalendar size={16} />,
icon: <IconCalendar size={16} />,
_type: 'default_sort',
},
{
key: 'city',
label: 'City',
icon: <TbMapPin size={16} />,
icon: <IconMapPin size={16} />,
_type: 'default_sort',
},
] satisfies Array<SortType<People_Order_By>>;