mirror of
https://github.com/docmost/docmost.git
synced 2026-07-14 20:16:45 +10:00
27 lines
582 B
TypeScript
27 lines
582 B
TypeScript
import { memo } from "react";
|
|
import { IconPlus } from "@tabler/icons-react";
|
|
import { useTranslation } from "react-i18next";
|
|
import classes from "@/features/base/styles/grid.module.css";
|
|
|
|
type AddRowButtonProps = {
|
|
onClick?: () => void;
|
|
};
|
|
|
|
export const AddRowButton = memo(function AddRowButton({
|
|
onClick,
|
|
}: AddRowButtonProps) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<div
|
|
className={classes.addRowButton}
|
|
onClick={onClick}
|
|
role="button"
|
|
tabIndex={0}
|
|
>
|
|
<IconPlus size={14} />
|
|
<span>{t("New row")}</span>
|
|
</div>
|
|
);
|
|
});
|