mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-14 00:59:26 -05:00
* Initial * Progress * Form fields fun * Pov * Progress * Some errors * Progress * Progress * Progress * Progress * Comment * Progress * Remove comment * Fix editing * Redundant check
26 lines
483 B
TypeScript
26 lines
483 B
TypeScript
import { useTranslation } from "react-i18next";
|
|
import { Button } from "../Button";
|
|
import { PlusIcon } from "../icons/Plus";
|
|
|
|
export function AddFieldButton({
|
|
onClick,
|
|
}: {
|
|
onClick: () => void;
|
|
}) {
|
|
const { t } = useTranslation(["common"]);
|
|
|
|
return (
|
|
<Button
|
|
icon={<PlusIcon />}
|
|
aria-label="Add form field"
|
|
size="tiny"
|
|
variant="minimal"
|
|
onClick={onClick}
|
|
className="self-start"
|
|
testId="add-field-button"
|
|
>
|
|
{t("common:actions.add")}
|
|
</Button>
|
|
);
|
|
}
|