mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
fixes
This commit is contained in:
parent
d43649e92b
commit
d7af6f9f84
@ -8388,7 +8388,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = `
|
||||
<a
|
||||
class="emotion-1"
|
||||
href="./"
|
||||
target="_blank"
|
||||
target=""
|
||||
>
|
||||
<svg
|
||||
class="emotion-0"
|
||||
@ -9814,7 +9814,7 @@ exports[`Storyshots UI|Sidebar/Sidebar simple 1`] = `
|
||||
<a
|
||||
class="emotion-1"
|
||||
href="./"
|
||||
target="_blank"
|
||||
target=""
|
||||
>
|
||||
<svg
|
||||
class="emotion-0"
|
||||
@ -11304,7 +11304,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading menuHighlighted 1`] = `
|
||||
<a
|
||||
class="emotion-1"
|
||||
href="./"
|
||||
target="_blank"
|
||||
target=""
|
||||
>
|
||||
<svg
|
||||
class="emotion-0"
|
||||
@ -11935,7 +11935,7 @@ exports[`Storyshots UI|Sidebar/SidebarHeading standard 1`] = `
|
||||
<a
|
||||
class="emotion-1"
|
||||
href="./"
|
||||
target="_blank"
|
||||
target=""
|
||||
>
|
||||
<svg
|
||||
class="emotion-0"
|
||||
|
@ -65,12 +65,13 @@ const Head = styled.div({
|
||||
});
|
||||
|
||||
const Brand = withTheme(({ theme: { brand: { title = 'Storybook', url = './', image } } }) => {
|
||||
const targetValue = url === './' ? '' : '_blank';
|
||||
if (image === undefined && url === null) {
|
||||
return <Logo alt={title} />;
|
||||
}
|
||||
if (image === undefined && url) {
|
||||
return (
|
||||
<LogoLink href={url} target="_blank">
|
||||
<LogoLink href={url} target={targetValue}>
|
||||
<Logo alt={title} />
|
||||
</LogoLink>
|
||||
);
|
||||
@ -80,7 +81,7 @@ const Brand = withTheme(({ theme: { brand: { title = 'Storybook', url = './', im
|
||||
}
|
||||
if (image === null && url) {
|
||||
return (
|
||||
<LogoLink href={url} target="_blank">
|
||||
<LogoLink href={url} target={targetValue}>
|
||||
{title}
|
||||
</LogoLink>
|
||||
);
|
||||
@ -90,7 +91,7 @@ const Brand = withTheme(({ theme: { brand: { title = 'Storybook', url = './', im
|
||||
}
|
||||
if (image && url) {
|
||||
return (
|
||||
<LogoLink href={url} target="_blank">
|
||||
<LogoLink href={url} target={targetValue}>
|
||||
<Img src={image} alt={title} />
|
||||
</LogoLink>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user