mirror of
https://github.com/docmost/docmost.git
synced 2026-06-14 03:29:56 +00:00
29 lines
672 B
TypeScript
29 lines
672 B
TypeScript
import { useTranslation } from "react-i18next";
|
|
import { IconPlus } from "@tabler/icons-react";
|
|
import classes from "@/ee/base/styles/kanban.module.css";
|
|
|
|
type KanbanAddCardButtonProps = {
|
|
onAddCard: () => void;
|
|
};
|
|
|
|
export function KanbanAddCardButton({ onAddCard }: KanbanAddCardButtonProps) {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<div
|
|
className={classes.addCard}
|
|
role="button"
|
|
tabIndex={0}
|
|
onClick={onAddCard}
|
|
onKeyDown={(e) => {
|
|
if (e.key === "Enter" || e.key === " ") {
|
|
e.preventDefault();
|
|
onAddCard();
|
|
}
|
|
}}
|
|
>
|
|
<IconPlus size={16} />
|
|
{t("New row")}
|
|
</div>
|
|
);
|
|
}
|