import { createStyles, Flex, Tabs, TextInput } from '@mantine/core'; import { UseFormReturnType } from '@mantine/form'; import { IconPhoto } from '@tabler/icons'; import { useTranslation } from 'next-i18next'; import { ServiceType } from '../../../../../../types/service'; import { IconSelector } from './IconSelector/IconSelector'; interface AppearanceTabProps { form: UseFormReturnType ServiceType>; } export const AppearanceTab = ({ form }: AppearanceTabProps) => { const { t } = useTranslation(''); const { classes } = useStyles(); const Image = () => { if (form.values.appearance.iconUrl !== undefined) { // disabled due to too many dynamic targets for next image cache // eslint-disable-next-line @next/next/no-img-element return jife; } return ; }; return ( } label="Service Icon" description="Logo of your service displayed in your dashboard. Must return a body content containg an image" variant="default" withAsterisk required {...form.getInputProps('appearance.iconUrl')} /> form.setValues({ appearance: { iconUrl: item.url, }, }) } /> ); }; const useStyles = createStyles(() => ({ textInput: { flexGrow: 1, }, iconImage: { objectFit: 'contain', width: 20, height: 20, }, }));