From 601205d202f1f25f7a9604b55b96bab8ffaecf02 Mon Sep 17 00:00:00 2001 From: epravdina Date: Thu, 17 Aug 2023 10:04:41 +0300 Subject: [PATCH] refactor(link): remove normal-visitable view --- src/components/Link/Link.scss | 6 ++---- src/components/Link/Link.tsx | 5 +---- src/components/Link/__stories__/Link.new.stories.tsx | 2 +- src/components/Link/__stories__/LinkShowcase.tsx | 4 ---- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/components/Link/Link.scss b/src/components/Link/Link.scss index 6289087896..d7633d998c 100644 --- a/src/components/Link/Link.scss +++ b/src/components/Link/Link.scss @@ -16,8 +16,7 @@ $block: '.#{variables.$ns}link'; outline: 0; } - &_view_normal, - &_view_normal-visitable { + &_view_normal { color: var(--g-color-text-link); } @@ -37,8 +36,7 @@ $block: '.#{variables.$ns}link'; } } - &_visitable, - &_view_normal-visitable { + &_visitable { &:visited { color: var(--g-color-text-link-visited); } diff --git a/src/components/Link/Link.tsx b/src/components/Link/Link.tsx index dc237afd86..3c9b8e90f0 100644 --- a/src/components/Link/Link.tsx +++ b/src/components/Link/Link.tsx @@ -6,12 +6,9 @@ import {eventBroker} from '../utils/event-broker'; import './Link.scss'; -export type LinkView = 'normal' | 'primary' | 'secondary' | 'normal-visitable'; +export type LinkView = 'normal' | 'primary' | 'secondary'; export interface LinkProps extends DOMProps, QAProps { - /** - * 'normal-visitable' view is deprecated, use 'visitable' prop instead - */ view?: LinkView; visitable?: boolean; title?: string; diff --git a/src/components/Link/__stories__/Link.new.stories.tsx b/src/components/Link/__stories__/Link.new.stories.tsx index aa3a55ca76..12bb8d0d7f 100644 --- a/src/components/Link/__stories__/Link.new.stories.tsx +++ b/src/components/Link/__stories__/Link.new.stories.tsx @@ -15,7 +15,7 @@ export default { }, argTypes: { view: { - options: ['normal', 'primary', 'secondary', 'normal-visitable'], + options: ['normal', 'primary', 'secondary'], control: {type: 'select'}, description: 'test', }, diff --git a/src/components/Link/__stories__/LinkShowcase.tsx b/src/components/Link/__stories__/LinkShowcase.tsx index be2ff97cf6..4bc3ce4350 100644 --- a/src/components/Link/__stories__/LinkShowcase.tsx +++ b/src/components/Link/__stories__/LinkShowcase.tsx @@ -24,10 +24,6 @@ export function LinkShowcase() { name: 'View secondary', value: 'secondary', }, - { - name: 'View normal-visitable', - value: 'normal-visitable', - }, ], href: [ {