2022-12-04 21:19:40 +01:00
|
|
|
import { Tabs, TextInput, Switch, Text } from '@mantine/core';
|
|
|
|
|
import { UseFormReturnType } from '@mantine/form';
|
|
|
|
|
import { IconClick } from '@tabler/icons';
|
|
|
|
|
import { useTranslation } from 'next-i18next';
|
2022-12-18 22:27:01 +01:00
|
|
|
import { AppType } from '../../../../../../types/app';
|
2022-12-04 21:19:40 +01:00
|
|
|
|
|
|
|
|
interface BehaviourTabProps {
|
2022-12-18 22:27:01 +01:00
|
|
|
form: UseFormReturnType<AppType, (values: AppType) => AppType>;
|
2022-12-04 21:19:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const BehaviourTab = ({ form }: BehaviourTabProps) => {
|
2022-12-20 11:34:07 +09:00
|
|
|
const { t } = useTranslation('layout/modals/add-app');
|
|
|
|
|
|
2022-12-04 21:19:40 +01:00
|
|
|
return (
|
|
|
|
|
<Tabs.Panel value="behaviour" pt="xs">
|
2022-12-06 20:48:35 +01:00
|
|
|
<Switch
|
2022-12-20 11:34:07 +09:00
|
|
|
label={t('behaviour.isOpeningNewTab.label')}
|
|
|
|
|
description={t('behaviour.isOpeningNewTab.description')}
|
2022-12-06 20:48:35 +01:00
|
|
|
{...form.getInputProps('behaviour.isOpeningNewTab', { type: 'checkbox' })}
|
|
|
|
|
/>
|
2022-12-04 21:19:40 +01:00
|
|
|
</Tabs.Panel>
|
|
|
|
|
);
|
|
|
|
|
};
|