- {labelDescription || labelSecondary ? (
-
- {label || labelDescription ? (
-
- {label}
- {labelDescription && (
-
- {labelDescription}
-
- )}
-
- ) : (
- <> >
- )}
- {labelSecondary && (
-
- {labelSecondary}
-
- )}
-
- ) : (
- label &&
{label}
- )}
+ {label &&
{label}}
{
expect(labelElement.textContent).toBe('A Label')
})
- it('should render a "labelDescription"', () => {
- render(
-
- content
-
- )
-
- const labelElement = document.querySelector('label')
-
- expect(labelElement).toBeInTheDocument()
- expect(labelElement.className).toBe(
- 'dnb-form-label dnb-space__right--small dnb-space__top--zero dnb-space__bottom--x-small'
- )
- expect(labelElement.textContent).toBe('A Label Description')
- })
-
- it('should render a "labelSecondary"', () => {
- render(
- content
- )
-
- const labelElement = document.querySelector('label')
-
- expect(labelElement).toBeInTheDocument()
- expect(labelElement.className).toBe(
- 'dnb-form-label dnb-space__right--small dnb-space__top--zero dnb-space__bottom--x-small'
- )
- expect(labelElement.textContent).toBe('A Secondary Label')
- })
-
it('click on label should set focus on input after value change', async () => {
const MockComponent = () => {
const fromInput = React.useCallback(({ value }) => value, [])
diff --git a/packages/dnb-eufemia/src/extensions/forms/FieldBlock/style/dnb-field-block.scss b/packages/dnb-eufemia/src/extensions/forms/FieldBlock/style/dnb-field-block.scss
index d180211d83a..a30cd0adb1d 100644
--- a/packages/dnb-eufemia/src/extensions/forms/FieldBlock/style/dnb-field-block.scss
+++ b/packages/dnb-eufemia/src/extensions/forms/FieldBlock/style/dnb-field-block.scss
@@ -54,17 +54,6 @@ fieldset.dnb-forms-field-block {
align-items: center;
}
- &__label-description {
- margin-left: 0.3em;
- color: var(--color-black-55);
- font-size: var(--font-size-small);
- }
-
- &__label-secondary {
- color: var(--color-black-55);
- font-size: var(--font-size-small);
- }
-
&__status {
grid-area: status;
}
diff --git a/packages/dnb-eufemia/src/extensions/forms/Iterate/Array/Array.tsx b/packages/dnb-eufemia/src/extensions/forms/Iterate/Array/Array.tsx
index a21553267d4..611898594b0 100644
--- a/packages/dnb-eufemia/src/extensions/forms/Iterate/Array/Array.tsx
+++ b/packages/dnb-eufemia/src/extensions/forms/Iterate/Array/Array.tsx
@@ -36,8 +36,6 @@ function ArrayComponent(props: Props) {
layout = 'vertical',
placeholder,
label,
- labelDescription,
- labelSecondary,
path,
value: arrayValue,
info,
@@ -81,8 +79,6 @@ function ArrayComponent(props: Props) {
className={classnames('dnb-forms-field-number', className)}
layout={layout}
label={label}
- labelDescription={labelDescription}
- labelSecondary={labelSecondary}
info={info}
warning={warning}
error={error}
diff --git a/packages/dnb-eufemia/src/extensions/forms/types.ts b/packages/dnb-eufemia/src/extensions/forms/types.ts
index 6c62e20a82d..c51e310b3b6 100644
--- a/packages/dnb-eufemia/src/extensions/forms/types.ts
+++ b/packages/dnb-eufemia/src/extensions/forms/types.ts
@@ -163,10 +163,6 @@ export interface FieldProps<
layout?: 'horizontal' | 'vertical'
/** Main label text */
label?: React.ReactNode
- /** A more discreet text displayed beside the label (i.e for "(optional)") */
- labelDescription?: React.ReactNode
- /** Secondary information displayed at the end of the label line (i.e character counter) */
- labelSecondary?: React.ReactNode
/** Text showing in place of the value if no value is given */
placeholder?: string
autoComplete?: