Fixed multiple scrolls appearing on Page when added InfoCard with external bottom link
Signed-off-by: Alex Rybchenko <arybchenko@box.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Fixed multiple scrolls appearing on Page when added InfoCard with external bottom link
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { useAnalytics } from '@backstage/core-plugin-api';
|
||||
import classnames from 'classnames';
|
||||
import MaterialLink, {
|
||||
LinkProps as MaterialLinkProps,
|
||||
} from '@material-ui/core/Link';
|
||||
@@ -36,6 +37,9 @@ const useStyles = makeStyles(
|
||||
height: 1,
|
||||
width: 1,
|
||||
},
|
||||
externalLink: {
|
||||
position: 'relative',
|
||||
},
|
||||
},
|
||||
{ name: 'Link' },
|
||||
);
|
||||
@@ -100,6 +104,7 @@ export const Link = React.forwardRef<any, LinkProps>(
|
||||
onClick={handleClick}
|
||||
{...(newWindow ? { target: '_blank', rel: 'noopener' } : {})}
|
||||
{...props}
|
||||
className={classnames(classes.externalLink, props.className)}
|
||||
>
|
||||
{props.children}
|
||||
<span className={classes.visuallyHidden}>, Opens in a new window</span>
|
||||
|
||||
Reference in New Issue
Block a user