diff --git a/packages/db-ui-elements-stencil/src/components/db-button/db-button.tsx b/packages/db-ui-elements-stencil/src/components/db-button/db-button.tsx index 0f99cd9a8..3ead527d9 100644 --- a/packages/db-ui-elements-stencil/src/components/db-button/db-button.tsx +++ b/packages/db-ui-elements-stencil/src/components/db-button/db-button.tsx @@ -80,6 +80,11 @@ export class DbButton { */ @Prop({ reflect: true }) value?: string; + /** + * The width attribute let's you overwrite the standard display of the button width. + */ + @Prop({ reflect: true }) width?: 'auto' | 'full'; + /** * The variant attribute specifies a visual expression of button. */ @@ -113,6 +118,7 @@ export class DbButton { type={this.type} value={this.value} data-size={this.size} + data-width={this.width} > {this.icon ? : null} diff --git a/packages/db-ui-elements-stencil/src/components/db-button/readme.md b/packages/db-ui-elements-stencil/src/components/db-button/readme.md index 239a72648..6f59dc701 100644 --- a/packages/db-ui-elements-stencil/src/components/db-button/readme.md +++ b/packages/db-ui-elements-stencil/src/components/db-button/readme.md @@ -26,6 +26,7 @@ | `type` | `type` | The type attribute specifies the type of button. | `"button" \| "reset" \| "submit"` | `'submit'` | | `value` | `value` | The value attribute specifies an initial value for the button. | `string` | `undefined` | | `variant` | `variant` | The variant attribute specifies a visual expression of button. | `"brand-primary" \| "primary" \| "secondary-outline" \| "secondary-solid" \| "tertiary-plain"` | `undefined` | +| `width` | `width` | The width attribute let's you overwrite the standard display of the button width. | `"auto" \| "full"` | `undefined` | ## Dependencies diff --git a/packages/db-ui-elements-stencil/src/components/db-button/stories/button.intro.stories.mdx b/packages/db-ui-elements-stencil/src/components/db-button/stories/button.intro.stories.mdx index b58506e46..aead9d8a4 100644 --- a/packages/db-ui-elements-stencil/src/components/db-button/stories/button.intro.stories.mdx +++ b/packages/db-ui-elements-stencil/src/components/db-button/stories/button.intro.stories.mdx @@ -46,6 +46,14 @@ You could set the icons position – either before or after the text – by usin Secondary Outline Secondary Outline +width + +Regularly, our buttons shouldn't increase to it's horizontally available space, but only the one determined by it's included textual content. Use `width` property with the value of `full` to overwrite this definition. + + + (Default) Auto widthWidth full + + icononly (only use with care) If you'd only like to display the icon without any text, you could set the attribute `icononly` on the button component. But please keep in mind that a visual text ensures clarity on the subject of this button as well enables use cases like controlling the page by voice (accessibility). diff --git a/packages/db-ui-elements-stencil/src/components/db-input/readme.md b/packages/db-ui-elements-stencil/src/components/db-input/readme.md index 7378aff1d..fbc91b7d9 100644 --- a/packages/db-ui-elements-stencil/src/components/db-input/readme.md +++ b/packages/db-ui-elements-stencil/src/components/db-input/readme.md @@ -20,9 +20,9 @@ | `label` _(required)_ | `label` | The label attribute specifies the caption of the input. | `string` | `undefined` | | `labelHidden` | `label-hidden` | The label-hidden attribute is a boolean attribute. When specified, the elements label gets visually hidden (it's important to still keep it displayed for accessibility reasons). | `string` | `undefined` | | `list` | `list` | The list attribute is used to identify an element that lists predefined options suggested to the user. | `string` | `undefined` | -| `max` | `max` | The max attribute specifies the maximum value that is sufficient for this input. | `number \| string` | `undefined` | +| `max` | `max` | The max attribute specifies the maximum value that is sufficient for this input. | `number \| string` | `undefined` | | `maxlength` | `maxlength` | /* The maxlength attribute, controlled by a dirty value flag, declares a limit on the number of characters a user can input. | `number` | `undefined` | -| `min` | `min` | The min attribute specifies the minimum value that is sufficient for this input. | `number \| string` | `undefined` | +| `min` | `min` | The min attribute specifies the minimum value that is sufficient for this input. | `number \| string` | `undefined` | | `minlength` | `minlength` | /* The minlength attribute, when it applies, is a form control minlength attribute. | `number` | `undefined` | | `name` | `name` | The name content attribute gives the name of the form control, as used in form submission and in the form element's elements object. If the attribute is specified, its value must not be the empty string. | `string` | `undefined` | | `pattern` | `pattern` | The pattern attribute specifies a regular expression against which the control's value is to be checked. | `string` | `undefined` |