Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
455a2cb
fix(button): enhance multi-line text support and update button styles
sarahbrng Sep 18, 2025
a646908
auto update snapshots (#5004)
github-actions[bot] Sep 18, 2025
b88d2d8
Merge branch 'main' into 1068-multiline-buttons
michaelmkraus Sep 19, 2025
c387526
Update packages/components/src/components/button/button.scss
sarahbrng Sep 24, 2025
955ae67
Your commit message
sarahbrng Sep 24, 2025
8cc87a5
Merge branch 'main' into 1068-multiline-buttons
sarahbrng Sep 24, 2025
a260981
auto update snapshots (#5052)
github-actions[bot] Sep 24, 2025
99bc9f7
Update packages/components/src/components/button/button.scss
sarahbrng Sep 26, 2025
2fcb678
auto update snapshots (#5074)
github-actions[bot] Sep 26, 2025
7855b8a
feat: improve button styles for multiline support
sarahbrng Sep 28, 2025
702dc1c
auto update snapshots (#5079)
github-actions[bot] Sep 28, 2025
672d7c6
Merge branch 'main' into 1068-multiline-buttons
sarahbrng Sep 29, 2025
5838cd1
Merge remote-tracking branch 'refs/remotes/origin/main' into 1068-mul…
nmerget Oct 7, 2025
1abfb63
chore: add changeset
nmerget Oct 7, 2025
e4fcdf8
auto update snapshots (#5156)
github-actions[bot] Oct 7, 2025
afca40e
Merge branch 'main' into 1068-multiline-buttons
mfranzke Oct 7, 2025
9fc576a
chore: update from main
nmerget Oct 8, 2025
e2e5dd1
auto update snapshots (#5169)
github-actions[bot] Oct 8, 2025
36b5e2e
Merge remote-tracking branch 'origin/main' into 1068-multiline-buttons
nmerget Oct 10, 2025
b505587
auto update snapshots (#5196)
github-actions[bot] Oct 10, 2025
73b7a81
fix: angular and stencil issue with blank spaces
nmerget Oct 14, 2025
240caef
auto update snapshots (#5244)
github-actions[bot] Oct 14, 2025
0a80801
Merge remote-tracking branch 'origin/main' into 1068-multiline-buttons
nmerget Oct 15, 2025
cdeb10a
fix: issue with burger-button for stencil
nmerget Oct 15, 2025
2ae66c6
Update .changeset/tricky-regions-agree.md
nmerget Oct 15, 2025
82614ca
Merge branch 'main' into 1068-multiline-buttons
nmerget Oct 15, 2025
510b524
fix: issue with small button
nmerget Oct 15, 2025
e36de97
auto update snapshots (#5264)
github-actions[bot] Oct 15, 2025
7e85180
Update packages/components/src/components/button/button.scss
nmerget Oct 17, 2025
f356f26
auto update snapshots (#5299)
github-actions[bot] Oct 17, 2025
e3714ef
Merge branch 'main' into 1068-multiline-buttons
sarahbrng Oct 29, 2025
3f254c9
Merge branch 'main' into 1068-multiline-buttons
nmerget Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/tricky-regions-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@db-ux/core-components": patch
"@db-ux/ngx-core-components": patch
"@db-ux/react-core-components": patch
"@db-ux/v-core-components": patch
"@db-ux/wc-core-components": patch
---

fix(button): Replace fixed height with min-height for buttons to allow dynamic height adjustment when text wraps
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
- button "True"
- link "Width"
- button "(Default) Auto"
- button "Width"
- button "Width"
- link "Multi-line Text With Line Breaks"
- button "Multi-line Text With Automatic Line Breaks"
- button "Multi-line Text With Automatic Line Breaks and Icon"
- button "Button Small Multi-line Text With Automatic Line Breaks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
- button "True"
- link "Width"
- button "(Default) Auto"
- button "Width"
- button "Width"
- link "Multi-line Text With Line Breaks"
- button "Multi-line Text With Automatic Line Breaks"
- button "Multi-line Text With Automatic Line Breaks and Icon"
- button "Button Small Multi-line Text With Automatic Line Breaks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
- button "True"
- link "Width"
- button "(Default) Auto"
- button "Width"
- button "Width"
- link "Multi-line Text With Line Breaks"
- button "Multi-line Text With Automatic Line Breaks"
- button "Multi-line Text With Automatic Line Breaks and Icon"
- button "Button Small Multi-line Text With Automatic Line Breaks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
- button "True"
- link "Width"
- button "(Default) Auto"
- button "Width"
- button "Width"
- link "Multi-line Text With Line Breaks"
- button "Multi-line Text With Automatic Line Breaks"
- button "Multi-line Text With Automatic Line Breaks and Icon"
- button "Button Small Multi-line Text With Automatic Line Breaks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
- button "True"
- link "Width"
- button "(Default) Auto"
- button "Width"
- button "Width"
- link "Multi-line Text With Line Breaks"
- button "Multi-line Text With Automatic Line Breaks"
- button "Multi-line Text With Automatic Line Breaks and Icon"
- button "Button Small Multi-line Text With Automatic Line Breaks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,8 @@
- button "True"
- link "Width"
- button "(Default) Auto"
- button "Width"
- button "Width"
- link "Multi-line Text With Line Breaks"
- button "Multi-line Text With Automatic Line Breaks"
- button "Multi-line Text With Automatic Line Breaks and Icon"
- button "Button Small Multi-line Text With Automatic Line Breaks"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified __snapshots__/tag/component/chromium/DBTag-should-be-a-button.png
Binary file modified __snapshots__/tag/component/firefox/DBTag-should-be-a-button.png
15 changes: 10 additions & 5 deletions packages/components/src/components/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
@use "../../styles/internal/component";
@use "../../styles/internal/button-components";

// generic styles can be found in _button-components.scss
.db-button {
@extend %default-interactive-component;
@extend %default-button;
@extend %db-overwrite-font-size-md;

max-inline-size: 100%;
color: colors.$db-adaptive-on-bg-basic-emphasis-100-default;
block-size: variables.$db-sizing-md;
min-block-size: variables.$db-sizing-md;
block-size: max-content;
inline-size: fit-content;
padding: variables.$db-spacing-fixed-xs variables.$db-spacing-fixed-md;
padding: variables.$db-spacing-fixed-2xs variables.$db-spacing-fixed-md;

// disable text-decoration if someone wants to use the button for an <a> tag
text-decoration: none;
Expand All @@ -25,6 +28,7 @@
@include icons.is-icon-text-replace;

padding: 0;
aspect-ratio: 1;
inline-size: variables.$db-sizing-md;

&::before {
Expand All @@ -36,11 +40,11 @@
@extend %db-overwrite-font-size-sm;

font-weight: 700;
block-size: variables.$db-sizing-sm;
min-block-size: variables.$db-sizing-sm;

&:not([data-no-text="true"]) {
padding: variables.$db-spacing-fixed-3xs
variables.$db-spacing-fixed-sm;
// stylelint-disable-next-line db-ux/use-spacings
padding: 2px variables.$db-spacing-fixed-sm;

&::before {
margin-inline-end: variables.$db-spacing-fixed-2xs;
Expand Down Expand Up @@ -113,6 +117,7 @@
&:has(> .db-button) {
margin: 0;
padding: 0;
block-size: variables.$db-sizing-md;

&::before {
content: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

%default-button {
font-weight: 700;
white-space: nowrap; // we don't want to break buttons
overflow-wrap: break-word; // Multiple lines support
white-space: pre-line; // Multiple lines support
justify-content: center;
text-align: center;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
[disabled]="exampleProps?.disabled"
[width]="exampleProps?.width"
(click)="showAlert(exampleName)"
>{{ exampleName }}</db-button
>
{{ exampleName }}
</db-button>
</ng-template>
</app-default-component>
27 changes: 27 additions & 0 deletions showcases/shared/button.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,32 @@
}
}
]
},
{
"name": "Multi-line Text With Line Breaks",
"examples": [
{
"name": "Multi-line Text With Automatic Line Breaks",
"style": { "width": "300px" },
"props": {
"width": "full"
}
},
{
"name": "Multi-line Text With Automatic Line Breaks and Icon",
"style": { "width": "300px" },
"props": {
"width": "full",
"icon": "x_placeholder"
}
},
{
"name": "Button Small Multi-line Text With Automatic Line Breaks",
"style": { "width": "300px" },
"props": {
"size": "small"
}
}
]
}
]