From 9f5c982d0bcf91c802cca97f6b4706d9e6671758 Mon Sep 17 00:00:00 2001 From: Guillaume Roux Date: Fri, 18 Oct 2024 16:34:10 +0200 Subject: [PATCH] prevent link from taking all the parent space --- ui/components/app/snaps/snap-ui-link/snap-ui-link.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/components/app/snaps/snap-ui-link/snap-ui-link.js b/ui/components/app/snaps/snap-ui-link/snap-ui-link.js index e49f07a80a11..6f3b50b695ee 100644 --- a/ui/components/app/snaps/snap-ui-link/snap-ui-link.js +++ b/ui/components/app/snaps/snap-ui-link/snap-ui-link.js @@ -2,6 +2,7 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import { AlignItems, + BlockSize, Display, FlexDirection, } from '../../../../helpers/constants/design-system'; @@ -54,8 +55,12 @@ export const SnapUILink = ({ href, children }) => { onClick={handleLinkClick} externalLink size={ButtonLinkSize.Inherit} - display={Display.Inline} + display={Display.InlineBlock} className="snap-ui-link" + style={{ + // Prevents the link from taking up the full width of the parent. + width: 'fit-content', + }} textProps={{ display: Display.InlineFlex, flexDirection: FlexDirection.Row,