Skip to content

Commit

Permalink
[TM-1580] Respect the label specified in the form builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
roguenet committed Dec 18, 2024
1 parent f9bed09 commit e7933ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const RHFTreeSpeciesInput = (props: PropsWithChildren<RHFTreeSpeciesInputProps>)
return (
<TreeSpeciesInput
{...props}
title={t("Tree Species")}
title={t("Species")}
buttonCaptionSuffix={t("Species")}
withPreviousCounts={true}
useTaxonomicBackbone={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import InputWrapper, { InputWrapperProps } from "../InputElements/InputWrapper";

export interface TreeSpeciesInputProps extends Omit<InputWrapperProps, "error"> {
title: string;
label?: string;
buttonCaptionSuffix: string;
withNumbers?: boolean;
withPreviousCounts: boolean;
Expand Down Expand Up @@ -191,7 +192,7 @@ const TreeSpeciesInput = (props: TreeSpeciesInputProps) => {
return (
<InputWrapper
inputId={id}
label={"ADD TREE SPECIES"}
label={props.label ?? t("ADD TREE SPECIES")}
description={props.description}
containerClassName={props.containerClassName}
required={props.required}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`Storyshots Components/Elements/Inputs/TreeSpeciesInput Default 1`] = `
data-testid="txt"
htmlFor=":r23:"
>
ADD TREE SPECIES *
Tree Species Grown *
</label>
<p
className="text-body-400 with-inner-html"
Expand Down Expand Up @@ -229,7 +229,7 @@ exports[`Storyshots Components/Elements/Inputs/TreeSpeciesInput With Number 1`]
data-testid="txt"
htmlFor=":r28:"
>
ADD TREE SPECIES *
Tree Species Grown *
</label>
<p
className="text-body-400 with-inner-html"
Expand Down

0 comments on commit e7933ec

Please sign in to comment.