diff --git a/packages/fuselage/src/components/Field/Field.stories.tsx b/packages/fuselage/src/components/Field/Field.stories.tsx
index bb408898eb..7f966654ba 100644
--- a/packages/fuselage/src/components/Field/Field.stories.tsx
+++ b/packages/fuselage/src/components/Field/Field.stories.tsx
@@ -3,16 +3,18 @@ import type { ComponentStory, ComponentMeta } from '@storybook/react';
import React from 'react';
import {
- CheckBox,
Field,
FieldDescription,
FieldError,
FieldHint,
FieldRow,
FieldLabel,
- InputBox,
ToggleSwitch,
FieldLink,
+ TextInput,
+ TextAreaInput,
+ RadioButton,
+ CheckBox,
} from '../..';
import { FieldLabelInfo } from './FieldLabelInfo';
@@ -30,150 +32,107 @@ export default {
-
+
>
),
},
},
} as ComponentMeta;
-export const Default: ComponentStory = () => (
+export const WithTextInput: ComponentStory = () => (
- Label
- Description
-
-
-
- Error
- Hint
-
-);
-export const WithLabelInfo: ComponentStory = () => (
-
-
+
Label
-
+
Description
-
+
+
+ Error feedback
+
+ Hint
+ Link
- Error
- Hint
);
-export const RequiredWithLabelInfo: ComponentStory = () => (
+export const WithTextArea: ComponentStory = () => (
-
+
Label
-
+
Description
-
- Error
- Hint
-
-);
-
-export const WithCheckBox: ComponentStory = () => (
-
-
-
- Label
-
-
-);
-
-export const WithToggleSwitch: ComponentStory = () => (
-
+ Error feedback
-
- Label
+ Hint
+ Link
);
-
-export const WithDescription: ComponentStory = () => (
+export const WithRadioButton: ComponentStory = () => (
- Label
-
- Descriptions should add useful and relevant additional information about
- what is required of the user for the related input. Its content is
- strictly composed by plain text.
-
-
+
+ Label
+
+
+
-
-);
-
-export const WithError: ComponentStory = () => (
-
- Label
+ Description
+ Error feedback
-
+ Hint
+ Link
-
- Error text appears when the user has inputted an invalid response to a
- field and let's the user know exactly what the issue is, so as to let them
- remedy the error as easily as possible.
-
);
-
-export const WithHint: ComponentStory = () => (
+export const WithToggleSwitch: ComponentStory = () => (
- Label
-
+
+ Label
+
+
+
-
- Hint fields help by explaining technical terms or concepts related to
- third-party apps and integrations.
-
-
-);
-
-export const WithHintAndError: ComponentStory = () => (
-
- Label
+ Description
+ Error feedback
-
+ Hint
+ Link
- Error must be above.
- Hint must be below.
);
-
-export const WithLink: ComponentStory = () => (
+export const WithCheckbox: ComponentStory = () => (
- Label
-
-
-
-
- Link is used for external resources or documentation.
-
+
+ Label
+
+
+
-
-);
-
-export const WithHintAndLink: ComponentStory = () => (
-
- Label
+ Description
+ Error feedback
-
-
-
- Same line as Link in the left
- Same line as Hint in the right
+ Hint
+ Link
);
diff --git a/packages/fuselage/src/components/Field/Field.styles.scss b/packages/fuselage/src/components/Field/Field.styles.scss
index c7ce7c8b95..75ebb93aca 100644
--- a/packages/fuselage/src/components/Field/Field.styles.scss
+++ b/packages/fuselage/src/components/Field/Field.styles.scss
@@ -38,10 +38,6 @@
margin-block-end: lengths.margin(2);
color: colors.font(secondary-info);
-
- & .rcx-field__label {
- padding-inline-start: lengths.padding(8);
- }
}
&__hint {
diff --git a/packages/fuselage/src/components/Field/__snapshots__/Field.spec.tsx.snap b/packages/fuselage/src/components/Field/__snapshots__/Field.spec.tsx.snap
index 706b04c819..b9f331a746 100644
--- a/packages/fuselage/src/components/Field/__snapshots__/Field.spec.tsx.snap
+++ b/packages/fuselage/src/components/Field/__snapshots__/Field.spec.tsx.snap
@@ -1,114 +1,90 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`[Field Component] renders Default without crashing 1`] = `
+exports[`[Field Component] renders WithCheckbox without crashing 1`] = `
-
- Label
-
-
- Description
-
-
-
-
-
-
- Error
-
-
- Hint
-
-
-
-
-`;
-
-exports[`[Field Component] renders RequiredWithLabelInfo without crashing 1`] = `
-
-
-
-
- Label
-
+ Label
- this is a info label
+
+ this is a info label
+
+
+
+
-
-
-
-
-
+
+
- *
-
-
+
+
+
+
Description
-
-
-
- Error
+ Error feedback
- Hint
+
+ Hint
+
+
+ Link
+
`;
-exports[`[Field Component] renders WithCheckBox without crashing 1`] = `
+exports[`[Field Component] renders WithRadioButton without crashing 1`] = `
-
-`;
-
-exports[`[Field Component] renders WithDescription without crashing 1`] = `
-
-
-
-
- Label
-
- Descriptions should add useful and relevant additional information about what is required of the user for the related input. Its content is strictly composed by plain text.
+ Description
-
-
-
+ Error feedback
-
-
-
-`;
-
-exports[`[Field Component] renders WithError without crashing 1`] = `
-
-
-
-
- Label
-
-
-
-
-
-
- Error text appears when the user has inputted an invalid response to a field and let's the user know exactly what the issue is, so as to let them remedy the error as easily as possible.
+ Hint
+
+
+ Link
+
`;
-exports[`[Field Component] renders WithHint without crashing 1`] = `
+exports[`[Field Component] renders WithTextArea without crashing 1`] = `
Label
-
-
-
-
-
+ hidden=""
+ id="fieldWithTextAreaInfo"
+ >
+ this is a info label
+
+
+
+
+
+
+ *
+
+
- Hint fields help by explaining technical terms or concepts related to third-party apps and integrations.
+ Description
-
-
-
-`;
-
-exports[`[Field Component] renders WithHintAndError without crashing 1`] = `
-
-
-
-
- Label
-
-
-
-
+
- Error must be above.
+ Error feedback
-
- Hint must be below.
-
-
-
-
-`;
-
-exports[`[Field Component] renders WithHintAndLink without crashing 1`] = `
-
-
-
@@ -318,7 +245,7 @@ exports[`[Field Component] renders WithHintAndLink without crashing 1`] = `
`;
-exports[`[Field Component] renders WithLabelInfo without crashing 1`] = `
+exports[`[Field Component] renders WithTextInput without crashing 1`] = `
-
-`;
-
-exports[`[Field Component] renders WithLink without crashing 1`] = `
-
-
-
@@ -425,12 +331,42 @@ exports[`[Field Component] renders WithToggleSwitch without crashing 1`] = `
+
+ Label
+
+
+ this is a info label
+
+
+
+
+
+
+ *
+
+
-
+
+ Description
+
+
+ Error feedback
+
+
+
- Label
-
+ Hint
+
+
+ Link
+