-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(app): remove marginLeft from ExternalLink component (#17112)
* fix(app): remove marginLeft from ExternalLink component
- Loading branch information
Showing
2 changed files
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
import type * as React from 'react' | ||
import { css } from 'styled-components' | ||
import { | ||
DISPLAY_INLINE_BLOCK, | ||
Icon, | ||
Link, | ||
SPACING, | ||
TYPOGRAPHY, | ||
} from '@opentrons/components' | ||
|
||
import { Link, Icon, TYPOGRAPHY, SPACING } from '@opentrons/components' | ||
import type { ReactNode } from 'react' | ||
import type { LinkProps } from '@opentrons/components' | ||
|
||
export interface ExternalLinkProps extends LinkProps { | ||
href: string | ||
id?: string | ||
children: React.ReactNode | ||
children: ReactNode | ||
} | ||
|
||
export const ExternalLink = (props: ExternalLinkProps): JSX.Element => ( | ||
<Link external {...props} css={TYPOGRAPHY.linkPSemiBold}> | ||
{props.children} | ||
<span css={SPAN_STYLE}></span> | ||
<Icon | ||
size={SPACING.spacing8} | ||
marginLeft="0.4375rem" | ||
name="open-in-new" | ||
aria-label="open_in_new_icon" | ||
/> | ||
</Link> | ||
) | ||
|
||
const SPAN_STYLE = css` | ||
display: ${DISPLAY_INLINE_BLOCK}; | ||
width: 0.4375rem; | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters