2022-12-10 15:45:15 +01:00
|
|
|
import { Button, Text } from '@mantine/core';
|
2023-05-15 17:40:59 +09:00
|
|
|
import { IconArrowNarrowLeft } from '@tabler/icons-react';
|
2023-01-02 01:11:25 +09:00
|
|
|
import { useTranslation } from 'next-i18next';
|
2022-12-04 21:19:40 +01:00
|
|
|
|
|
|
|
|
interface SelectorBackArrowProps {
|
|
|
|
|
onClickBack: () => void;
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-02 01:11:25 +09:00
|
|
|
export function SelectorBackArrow({ onClickBack }: SelectorBackArrowProps) {
|
|
|
|
|
const { t } = useTranslation('layout/element-selector/selector');
|
|
|
|
|
return (
|
|
|
|
|
<Button
|
|
|
|
|
leftIcon={<IconArrowNarrowLeft />}
|
|
|
|
|
onClick={onClickBack}
|
|
|
|
|
styles={{ inner: { width: 'fit-content' } }}
|
|
|
|
|
fullWidth
|
|
|
|
|
variant="default"
|
|
|
|
|
mb="md"
|
|
|
|
|
>
|
|
|
|
|
<Text>{t('goBack')}</Text>
|
|
|
|
|
</Button>
|
|
|
|
|
);
|
|
|
|
|
}
|