import { ActionIcon, Button, Tooltip } from '@mantine/core';
import { openContextModal } from '@mantine/modals';
import { IconApps } from '@tabler/icons';
import { useTranslation } from 'next-i18next';
import { useColorTheme } from '../../../../../tools/color';
interface AddElementActionProps {
type: 'action-icon' | 'button';
}
export const AddElementAction = ({ type }: AddElementActionProps) => {
const { t } = useTranslation('layout/element-selector/selector');
const { primaryColor, secondaryColor } = useColorTheme();
switch (type) {
case 'button':
return (
);
case 'action-icon':
return (
openContextModal({
modal: 'selectElement',
title: t('modal.title'),
size: 'xl',
innerProps: {},
})
}
>
);
default:
return null;
}
};