This commit is contained in:
2025-10-18 01:46:46 +03:00
commit 9baa68258e
74 changed files with 29125 additions and 0 deletions

View File

@ -0,0 +1,23 @@
import { IconPencil, IconTrash } from '@tabler/icons-react';
import { ActionIcon, Flex, rem } from '@mantine/core';
type Props<T> = {
element: T;
onChange: (element: T) => Promise<void>;
onDelete: (element: T) => Promise<void>;
};
const BaseTableActions = <T,>({ element, onChange, onDelete }: Props<T>) => {
return (
<Flex gap={rem(10)} align="center" justify="center">
<ActionIcon variant="default" onClick={async () => await onChange(element)}>
<IconPencil />
</ActionIcon>
<ActionIcon variant="default" onClick={async () => await onDelete(element)}>
<IconTrash />
</ActionIcon>
</Flex>
);
};
export default BaseTableActions;