Skip to content

Commit

Permalink
improve: TextLink に prefix/suffix を含まない場合はレイアウトコンポーネントを使わない (#1766)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Aug 4, 2021
1 parent 020e0bc commit 4e05ff4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/TextLink/TextLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,15 @@ export const TextLink: VFC<Props & ElementProps> = ({
onClick={actualOnClick}
themes={theme}
>
<LineUp gap={0.25} inline vAlign="center" as="span">
{prefix}
{children}
{actualSuffix}
</LineUp>
{prefix || actualSuffix ? (
<LineUp gap={0.25} inline vAlign="center" as="span">
{prefix}
{children}
{actualSuffix}
</LineUp>
) : (
children
)}
</StyledAncher>
)
}
Expand Down

0 comments on commit 4e05ff4

Please sign in to comment.