diff --git a/src/components/Label/Label.stories.ts b/src/components/Label/Label.stories.ts index e8dd75d02..f83f1d533 100644 --- a/src/components/Label/Label.stories.ts +++ b/src/components/Label/Label.stories.ts @@ -19,10 +19,3 @@ export const Default: StoryObj = { required: true, }, }; - -export const Optional: StoryObj = { - args: { - text: 'Label', - required: false, - }, -}; diff --git a/src/components/Label/Label.tsx b/src/components/Label/Label.tsx index ba9d63a30..88c7fc793 100644 --- a/src/components/Label/Label.tsx +++ b/src/components/Label/Label.tsx @@ -25,11 +25,16 @@ export interface Props { */ labelAfter?: ReactNode; /** - * String for the optional label. By default it is '(optional)' + * String for the optional label. + * + * **Default is `"(optional)"`** + * + * **Deprecated**. This will be removed in the next major version. + * @deprecated */ optionalLabel?: string; /** - * Indicates that field is required for form to be successfully submitted. Non-required fields will display a text "(optional)" beside the label text + * Indicates that field is required for form to be successfully submitted. */ required?: boolean; /** diff --git a/src/components/Label/__snapshots__/Label.test.ts.snap b/src/components/Label/__snapshots__/Label.test.ts.snap index 5560a63a6..92a3428c6 100644 --- a/src/components/Label/__snapshots__/Label.test.ts.snap +++ b/src/components/Label/__snapshots__/Label.test.ts.snap @@ -8,17 +8,3 @@ exports[` `; - -exports[`