Skip to content

Commit 07eee68

Browse files
authored
fix: link children align (#103)
1 parent 7e4e7bd commit 07eee68

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/Link/Link.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const LinkBlock = (props: WithChildren<LinkFullProps>) => {
7272
);
7373
case 'normal': {
7474
const linkProps = getLinkProps(url, hostname, target);
75+
const content = children || text;
7576

7677
return (
7778
<a
@@ -80,16 +81,18 @@ const LinkBlock = (props: WithChildren<LinkFullProps>) => {
8081
onClick={onClick}
8182
{...linkProps}
8283
>
83-
<span className={b('content')}>{children || text}</span>
84-
{arrow && (
84+
{arrow ? (
8585
<Fragment>
86+
<span className={b('content')}>{content}</span>
8687
{WORD_JOINER_SYM}
8788
<Icon
8889
className={b('arrow')}
8990
data={Chevron}
9091
size={getArrowSize(textSize)}
9192
/>
9293
</Fragment>
94+
) : (
95+
content
9396
)}
9497
</a>
9598
);

0 commit comments

Comments
 (0)