Presupuestador_web/client/src/app/quotes/components/AppendEmptyRowButton.tsx

22 lines
602 B
TypeScript
Raw Normal View History

2024-06-29 19:39:25 +00:00
import { Button, ButtonProps } from "@/ui";
2024-08-12 18:22:34 +00:00
import { t } from "i18next";
2024-06-29 19:39:25 +00:00
import { PlusCircleIcon } from "lucide-react";
2024-08-12 18:22:34 +00:00
export interface AppendEmptyRowButtonProps extends ButtonProps {
2024-06-29 19:39:25 +00:00
label?: string;
className?: string;
}
2024-08-12 18:22:34 +00:00
export const AppendEmptyRowButton = ({
label = t("common.append_empty_row"),
2024-06-29 19:39:25 +00:00
className,
...props
2024-08-12 18:22:34 +00:00
}: AppendEmptyRowButtonProps): JSX.Element => (
2024-08-25 20:06:24 +00:00
<Button type='button' variant='outline' {...props}>
2024-06-29 19:39:25 +00:00
<PlusCircleIcon className={label ? "w-4 h-4 mr-2" : "w-4 h-4"} />
{label && <>{label}</>}
</Button>
);
2024-08-12 18:22:34 +00:00
AppendEmptyRowButton.displayName = "AddNewRowButton";