Skip to content

Commit

Permalink
fix: issue with long inline links not breaking (#3232)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget authored Sep 25, 2024
1 parent 06e49bb commit 1827bb7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/components/src/styles/_link-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,14 @@
// TODO: We should evaluate whether we could move this declaration to the @font-face declarations even already
text-underline-position: from-font;
text-decoration-thickness: helpers.px-to-rem($pxValue: 1);
white-space: nowrap;

&:not([data-variant="inline"]) {
white-space: nowrap;
}

&[data-variant="inline"] {
display: inline;
}

&:focus-visible {
border-radius: variables.$db-border-radius-xs;
Expand Down
25 changes: 24 additions & 1 deletion showcases/react-showcase/src/components/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {
DBTabItem,
DBTag,
DBTextarea,
DBTooltip
DBTooltip,
DBLink
} from '../../../../../output/react/src';
import type {
ChangeEvent,
Expand Down Expand Up @@ -273,6 +274,28 @@ const FormComponent = () => {

<DBDivider />

<p>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed
diam nonumy eirmod tempor{' '}
<DBLink variant="inline" href="#">
invidunt
</DBLink>{' '}
ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur
sadipscing elitr, sed diam nonumy eirmod tempor{' '}
<DBLink variant="inline" href="#">
labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum.
Stet
</DBLink>{' '}
ut labore et dolore magna aliquyam erat, sed diam voluptua.
At vero eos et accusam et justo duo dolores et ea rebum.
Stet clita kasd gubergren, no sea takimata sanctus est Lorem
ipsum dolor sit amet.
</p>

<DBButton
onClick={() => {
setTabsTest(!tabsTest);
Expand Down

0 comments on commit 1827bb7

Please sign in to comment.