style(forms): add className override to FieldLabel and apply to Dictionary labels

This commit is contained in:
Nawaz Dhandala
2025-10-23 15:44:26 +01:00
parent 4f29fef5f6
commit 9176fa2c9b
2 changed files with 10 additions and 3 deletions

View File

@@ -148,6 +148,7 @@ const DictionaryForm: FunctionComponent<ComponentProps> = (
title="Key"
required={true}
hideOptionalLabel={true}
className="block text-xs text-gray-500 font-normal flex justify-between"
/>
</div>
<AutocompleteTextInput
@@ -173,6 +174,7 @@ const DictionaryForm: FunctionComponent<ComponentProps> = (
title="Type"
hideOptionalLabel={true}
required={true}
className="block text-xs text-gray-500 font-normal flex justify-between"
/>
</div>
<Dropdown
@@ -206,6 +208,7 @@ const DictionaryForm: FunctionComponent<ComponentProps> = (
title="Value"
hideOptionalLabel={true}
required={true}
className="block text-xs text-gray-500 font-normal flex justify-between"
/>
</div>
{item.type === ValueType.Text && (

View File

@@ -9,6 +9,7 @@ export interface ComponentProps {
description?: string | ReactElement | undefined;
isHeading?: boolean | undefined;
hideOptionalLabel?: boolean | undefined;
className?: string | undefined;
}
const FieldLabelElement: FunctionComponent<ComponentProps> = (
@@ -17,9 +18,12 @@ const FieldLabelElement: FunctionComponent<ComponentProps> = (
return (
<>
<label
className={`block ${
props.isHeading ? "text-lg" : "text-sm"
} font-medium text-gray-700 flex justify-between`}
className={
props.className ||
`block ${
props.isHeading ? "text-lg" : "text-sm"
} font-medium text-gray-700 flex justify-between`
}
>
<span>
{props.title}{" "}