diff --git a/packages/calcite-components/src/components/label/label.scss b/packages/calcite-components/src/components/label/label.scss index 92669675a8d..6aa7bf77cd7 100644 --- a/packages/calcite-components/src/components/label/label.scss +++ b/packages/calcite-components/src/components/label/label.scss @@ -50,6 +50,7 @@ color: var(--calcite-label-text-color, var(--calcite-color-text-1)); } +:host([layout="block"]), :host([layout="default"]) { .container { @apply flex flex-col; diff --git a/packages/calcite-components/src/components/label/label.stories.ts b/packages/calcite-components/src/components/label/label.stories.ts index 7e61f734014..a9eaa4b9613 100644 --- a/packages/calcite-components/src/components/label/label.stories.ts +++ b/packages/calcite-components/src/components/label/label.stories.ts @@ -76,6 +76,18 @@ export const simple = (): string => html` Add Notes + + layout="block" + + + + layout="inline" + + + + layout="inline-space-between" + + `; diff --git a/packages/calcite-components/src/components/label/label.tsx b/packages/calcite-components/src/components/label/label.tsx index 66c7f828fb8..c209a4cf2d6 100644 --- a/packages/calcite-components/src/components/label/label.tsx +++ b/packages/calcite-components/src/components/label/label.tsx @@ -32,8 +32,9 @@ export class Label extends LitElement { /** Specifies the `id` of the component the label is bound to. Use when the component the label is bound to does not reside within the component. */ @property({ reflect: true }) for: string; - /** Defines the layout of the label in relation to the component. Use `"inline"` positions to wrap the label and component on the same line. */ - @property({ reflect: true }) layout: "inline" | "inline-space-between" | "default" = "default"; + /** Defines the layout of the label in relation to the component. Use `"inline"` positions to wrap the label and component on the same line. [Deprecated] The `"default"` value is deprecated, use `"block"` instead. */ + @property({ reflect: true }) layout: "block" | "inline" | "inline-space-between" | "default" = + "default"; /** Specifies the size of the component. */ @property({ reflect: true }) scale: Scale = "m";