Files
Homarr/src/components/Dashboard/Modals/SelectElement/Components/Shared/SelectorBackArrow.tsx

24 lines
614 B
TypeScript
Raw Normal View History

2022-12-10 15:45:15 +01:00
import { Button, Text } from '@mantine/core';
2022-12-04 21:19:40 +01:00
import { IconArrowNarrowLeft } from '@tabler/icons';
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>
);
}