From 045b2cf870f44f834155944874dfd164a00eb4fe Mon Sep 17 00:00:00 2001 From: Ruslan Lukoyanov <105169805+rLukoyanov@users.noreply.github.com> Date: Sat, 15 Jun 2024 22:11:05 +0400 Subject: [PATCH] feat(link_underline): add link underline --- src/components/Link/Link.scss | 4 ++++ src/components/Link/Link.tsx | 4 +++- src/components/Link/__stories__/Link.new.stories.tsx | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/Link/Link.scss b/src/components/Link/Link.scss index 618e92bbcd..e132a97940 100644 --- a/src/components/Link/Link.scss +++ b/src/components/Link/Link.scss @@ -42,4 +42,8 @@ $block: '.#{variables.$ns}link'; color: var(--g-color-text-link-visited-hover); } } + + &_underline { + text-decoration: underline; + } } diff --git a/src/components/Link/Link.tsx b/src/components/Link/Link.tsx index 2be2983f5a..3b693cae3c 100644 --- a/src/components/Link/Link.tsx +++ b/src/components/Link/Link.tsx @@ -13,6 +13,7 @@ export type LinkView = 'normal' | 'primary' | 'secondary'; export interface LinkProps extends DOMProps, QAProps { view?: LinkView; visitable?: boolean; + underline?: boolean; title?: string; href: string; target?: string; @@ -31,6 +32,7 @@ export const Link = React.forwardRef(function Link { view = 'normal', visitable, + underline, href, target, rel, @@ -63,7 +65,7 @@ export const Link = React.forwardRef(function Link onBlur, id, style, - className: b({view, visitable}, className), + className: b({view, visitable, underline}, className), 'data-qa': qa, }; diff --git a/src/components/Link/__stories__/Link.new.stories.tsx b/src/components/Link/__stories__/Link.new.stories.tsx index cd6deaa11e..0640393b46 100644 --- a/src/components/Link/__stories__/Link.new.stories.tsx +++ b/src/components/Link/__stories__/Link.new.stories.tsx @@ -40,6 +40,9 @@ export default { id: { control: {type: 'text'}, }, + underline: { + control: {type: 'boolean'}, + }, }, parameters: { order: -100,