-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Link): remove flexbox allowing text to break (#4274)
- Loading branch information
1 parent
2158cec
commit 59df043
Showing
12 changed files
with
79 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ultraviolet/ui": patch | ||
--- | ||
|
||
Fix `<Link />` component not to be flexbox allowing the text to break |
34 changes: 21 additions & 13 deletions
34
packages/ui/src/components/Alert/__stories__/Link.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
packages/ui/src/components/Link/__stories__/Examples.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import type { Decorator } from '@storybook/react' | ||
import type { ComponentProps } from 'react' | ||
import { Link } from '..' | ||
import { Stack } from '../../Stack' | ||
import { Text } from '../../Text' | ||
|
||
export const Examples = (props: ComponentProps<typeof Link>) => ( | ||
<> | ||
<Text as="p" variant="body"> | ||
To know more about that feature please visit{' '} | ||
<Link | ||
{...props} | ||
target="_blank" | ||
variant="inline" | ||
href="https://example.com" | ||
> | ||
our website | ||
</Link>{' '} | ||
that is available any time. | ||
</Text> | ||
<Text as="p" variant="body"> | ||
To know more about that feature please visit{' '} | ||
<Link {...props} target="_blank" href="https://example.com"> | ||
our website | ||
</Link>{' '} | ||
that is available any time. | ||
</Text> | ||
<Text as="p" variant="body"> | ||
To know more about that feature please visit{' '} | ||
<Link {...props} iconPosition="right" href="https://example.com"> | ||
our website | ||
</Link>{' '} | ||
that is available any time. | ||
</Text> | ||
</> | ||
) | ||
|
||
Examples.decorators = [ | ||
StoryComponent => ( | ||
<Stack> | ||
<StoryComponent /> | ||
</Stack> | ||
), | ||
] satisfies Decorator[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.