File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ import { PiArrowSquareOutBold } from 'react-icons/pi' ;
2+
3+ import { Icon } from '..' ;
4+ import type { LinkProps } from '.' ;
5+ import { Link } from '.' ;
6+
7+ export type ExternalLinkProps = Omit < LinkProps , 'isExternal' | 'children' > & { label : string } ;
8+
9+ export const ExternalLink = ( props : ExternalLinkProps ) => {
10+ return (
11+ < Link href = { props . href } isExternal >
12+ { props . label }
13+ < Icon display = "inline" verticalAlign = "middle" marginInlineStart = { 2 } as = { PiArrowSquareOutBold } />
14+ </ Link >
15+ ) ;
16+ } ;
Original file line number Diff line number Diff line change 1+ export type { ExternalLinkProps } from './external-link' ;
2+ export { ExternalLink } from './external-link' ;
13export type { LinkProps } from './wrapper' ;
24export { Link } from './wrapper' ;
You can’t perform that action at this time.
0 commit comments