allow custom add button text via uiSchema

This commit is contained in:
Josh Hawkins 2026-04-01 07:23:02 -05:00
parent 6bcdbd7232
commit 43d35299f7

View File

@ -60,7 +60,9 @@ export function AddPropertyButton({
className="gap-2"
>
<LuPlus className="h-4 w-4" />
{t("button.add", { ns: "common", defaultValue: "Add" })}
{typeof uiSchema?.["ui:options"]?.addButtonText === "string"
? uiSchema["ui:options"].addButtonText
: t("button.add", { ns: "common", defaultValue: "Add" })}
</Button>
);
}