Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Link): rm margin from icon #7579

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion packages/vkui/src/components/Link/Link.e2e-playground.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Icon24ExternalLinkOutline } from '@vkontakte/icons';
import { ComponentPlayground, type ComponentPlaygroundProps } from '@vkui-e2e/playground-helpers';
import { Link, type LinkProps } from './Link';

Expand All @@ -7,7 +8,8 @@ export const LinkFocusVisiblePlayground = (props: ComponentPlaygroundProps) => (
<div style={{ width: 300, padding: 10 }}>
Нажимая «Продолжить», вы принимаете{' '}
<Link href="#" {...props}>
пользовательское соглашение
пользовательское соглашение&nbsp;
<Icon24ExternalLinkOutline width={16} height={16} />
</Link>
...
</div>
Expand Down
1 change: 0 additions & 1 deletion packages/vkui/src/components/Link/Link.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

/* stylelint-disable-next-line selector-pseudo-class-disallowed-list */
.Link :global(.vkuiIcon) {
margin-inline-start: 4px;
display: inline-block;
vertical-align: middle;
}
3 changes: 2 additions & 1 deletion packages/vkui/src/components/Link/Link.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const WithIcon: Story = {
target: '_blank',
children: (
<>
https://google.com <Icon24ExternalLinkOutline width={16} height={16} />
https://google.com&nbsp;
<Icon24ExternalLinkOutline width={16} height={16} />
</>
),
},
Expand Down
5 changes: 3 additions & 2 deletions packages/vkui/src/components/Link/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
<Spacing size={24} />

<Link href="https://google.com" target="_blank">
https://google.com <Icon24ExternalLinkOutline width={16} height={16} />
https://google.com&nbsp;
<Icon24ExternalLinkOutline width={16} height={16} />
</Link>

<Spacing size={24} />

<div style={{ width: 304 }}>
Нажимая «Продолжить», вы принимаете <Link href="#">пользовательское соглашение</Link> и{' '}
Нажимая «Продолжить», вы принимаете&nbsp;<Link href="#">пользовательское соглашение</Link> и{' '}
<Link href="#">политику конфиденциальности</Link>.
</div>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading