File size: 390 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import * as React from 'react';
const NewTabStory = ({ children }) => {
if (window.location === window.parent.location) {
return children;
}
return (
<p>
This story should be{' '}
<a href={window.location.href} target="_blank" title="Open in new tab" rel="noreferrer">
opened in a new tab
</a>
.
</p>
);
};
export default NewTabStory;
|