Skip to content

Commit

Permalink
Added target prop for the link
Browse files Browse the repository at this point in the history
  • Loading branch information
jaiedsabid committed Jan 3, 2024
1 parent 879fd41 commit 8cba534
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/logo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ import React from 'react';
// Internal Dependencies.
import './style.scss';

const Logo = ( { className, text, src, alt, onClick, href } ) => {
const Logo = ( {
className,
text,
src,
alt,
onClick,
href,
target = '_self',
} ) => {
if ( ! text && ! src ) {
return '';
}
Expand All @@ -23,7 +31,7 @@ const Logo = ( { className, text, src, alt, onClick, href } ) => {
{ href ? (
<a
href={ href }
target="_blank"
target={ target }
rel="noopener noreferrer"
>
<img
Expand Down

0 comments on commit 8cba534

Please sign in to comment.