index.tsx
34 lines
| 1 | import './styles.scss'; |
| 2 | |
| 3 | type LinkProps = { |
| 4 | children: any; |
| 5 | href: string; |
| 6 | }; |
| 7 | |
| 8 | /** |
| 9 | * @since 3.0.0 |
| 10 | */ |
| 11 | export function InternalLink({children, href}: LinkProps) { |
| 12 | return ( |
| 13 | <a href={href} className={'givewp-welcome-banner-link givewp-welcome-banner-link--internal'}> |
| 14 | {children} |
| 15 | </a> |
| 16 | ); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @since 3.0.0 |
| 21 | */ |
| 22 | export function ExternalLink({children, href}: LinkProps) { |
| 23 | return ( |
| 24 | <a |
| 25 | href={href} |
| 26 | className={'givewp-welcome-banner-link givewp-welcome-banner-link--external'} |
| 27 | target={'_blank'} |
| 28 | rel="noopener noreferrer" |
| 29 | > |
| 30 | {children} |
| 31 | </a> |
| 32 | ); |
| 33 | } |
| 34 |