Skip to content

Commit 73a1d28

Browse files
authored
FCT-1262-ui-kit-text-field-change-position-of-the-additional-info-message (#2994)
* fix(TextField): align position of additional info message with the rest of the field components
1 parent c4c40e9 commit 73a1d28

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

.changeset/fuzzy-mirrors-leave.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@commercetools-uikit/text-field': patch
3+
---
4+
5+
Align position of additional info messages with the rest of the Field-components

packages/components/fields/text-field/src/text-field.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ BasicExample.args = {
4141
id: 'text-field-id',
4242
name: 'text-field-name',
4343
horizontalConstraint: 7,
44-
error: { missing: true, customError: true },
44+
errors: { missing: true, customError: true },
4545
renderError: (key: string) => {
4646
switch (key) {
4747
case 'customError':

packages/components/fields/text-field/src/text-field.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,6 @@ class TextField extends Component<TTextFieldProps, TTextFieldState> {
264264
aria-invalid={hasError}
265265
aria-errormessage={errorsContainerId}
266266
/>
267-
{this.props.additionalInfo && (
268-
<AdditionalInfoMessage message={this.props.additionalInfo} />
269-
)}
270267
<FieldErrors
271268
id={errorsContainerId}
272269
errors={this.props.errors}
@@ -279,6 +276,9 @@ class TextField extends Component<TTextFieldProps, TTextFieldState> {
279276
isVisible={hasWarning}
280277
renderWarning={this.props.renderWarning}
281278
/>
279+
{this.props.additionalInfo && (
280+
<AdditionalInfoMessage message={this.props.additionalInfo} />
281+
)}
282282
</Stack>
283283
</Constraints.Horizontal>
284284
);

0 commit comments

Comments
 (0)