fix wrapping on external link buttons

This commit is contained in:
David Lechner
2021-06-08 14:52:44 -05:00
parent 205937fdc3
commit 6c692a7e95
4 changed files with 12 additions and 9 deletions
+2 -2
View File
@@ -59,11 +59,11 @@ class AboutDialog extends React.Component<AboutDialogProps> {
{i18n.translate(AboutStringId.LicenseButtonLabel)}
</Button>
<AnchorButton href={changelogUrl} target="blank_">
{i18n.translate(AboutStringId.ChangelogButtonLabel)}&nbsp;
{i18n.translate(AboutStringId.ChangelogButtonLabel)}
<ExternalLinkIcon />
</AnchorButton>
<AnchorButton href={pybricksWebsiteUrl} target="blank_">
{i18n.translate(AboutStringId.WebsiteButtonLabel)}&nbsp;
{i18n.translate(AboutStringId.WebsiteButtonLabel)}
<ExternalLinkIcon />
</AnchorButton>
</div>
-4
View File
@@ -193,7 +193,6 @@ class SettingsDrawer extends React.PureComponent<SettingsProps> {
target="blank_"
>
{i18n.translate(SettingsStringId.HelpProjectsLabel)}
&nbsp;
<ExternalLinkIcon />
</AnchorButton>
<AnchorButton
@@ -202,7 +201,6 @@ class SettingsDrawer extends React.PureComponent<SettingsProps> {
target="blank_"
>
{i18n.translate(SettingsStringId.HelpSupportLabel)}
&nbsp;
<ExternalLinkIcon />
</AnchorButton>
<AnchorButton
@@ -211,7 +209,6 @@ class SettingsDrawer extends React.PureComponent<SettingsProps> {
target="blank_"
>
{i18n.translate(SettingsStringId.HelpChatLabel)}
&nbsp;
<ExternalLinkIcon />
</AnchorButton>
<AnchorButton
@@ -220,7 +217,6 @@ class SettingsDrawer extends React.PureComponent<SettingsProps> {
target="blank_"
>
{i18n.translate(SettingsStringId.HelpBugsLabel)}
&nbsp;
<ExternalLinkIcon />
</AnchorButton>
<AboutDialog
+6 -3
View File
@@ -11,9 +11,12 @@ import './external-link.scss';
class ExternalLinkIcon extends React.Component {
render(): JSX.Element {
return (
<sup className="pb-external-link">
<Icon icon="share" iconSize={12} />
</sup>
<span className="pb-external-link">
{' '}
<sup>
<Icon icon="share" iconSize={12} />
</sup>
</span>
);
}
}
+4
View File
@@ -3,6 +3,10 @@
@import '../variables.scss';
span.pb-external-link {
white-space: nowrap;
}
// override some button magic in case this is used in a button
.#{$ns}-button .pb-external-link .#{$ns}-icon:first-child:last-child {
margin: 0;