Skip to content

Commit ddb7364

Browse files
committed
#264 Fix styling on GitLab URL to grow. Fix margin between help button and GitLab URL
1 parent 846b17c commit ddb7364

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

src/client/backup/export/gitlab/GitLab.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function GitLab({loaded, snippetId, url, gitLabSetSnippetId, gitLabSetUrl
1919
return (
2020
<>
2121
<WithHelp title='Export to GitLab'
22+
containerClassName={styles.helpContainer}
2223
help={<GitLabHelp/>}>
2324
<GitLabUrlInput key={url}
2425
url={url}

src/client/backup/export/gitlab/gitlab.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ $label-size: 6em;
1717
}
1818
}
1919

20-
.help {
21-
margin: 0 $margin-right 0 0;
20+
.helpContainer {
21+
display: flex;
2222
}

src/client/backup/import/gitlab/GitLab.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function GitLab({snippetId, gitLabSetSnippetId, url, gitLabSetUrl, loaded
1919
return (
2020
<>
2121
<WithHelp title='Import from GitLab'
22+
containerClassName={styles.help}
2223
help={<GitLabHelp/>}>
2324
<GitLabUrlInput key={url}
2425
url={url}

src/client/backup/import/gitlab/gitlab.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ $label-size: 6em;
1717
width: 36em;
1818
}
1919
}
20+
21+
.help {
22+
display: flex;
23+
}

src/client/backup/snippet-id-input.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
.url {
99
@extend %first;
10+
11+
flex-grow: 1;
12+
margin: 0 1em 0 0;
1013
}
1114

1215
.snippet {

src/client/common/ContextualHelp.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ ContextualHelp.propTypes = {
3737
className: PropTypes.string
3838
}
3939

40-
export function WithHelp({help, title, className, children}) {
40+
export function WithHelp({help, title, containerClassName, className, children}) {
4141
return (
42-
<div className={styles.inline}>
42+
<div className={cn(styles.inline, containerClassName)}>
4343
{children}
4444
<ContextualHelp title={title} help={help} className={className}/>
4545
</div>
@@ -49,6 +49,7 @@ export function WithHelp({help, title, className, children}) {
4949
WithHelp.propTypes = {
5050
title: PropTypes.string.isRequired,
5151
help: PropTypes.element.isRequired,
52+
containerClassName: PropTypes.string,
5253
className: PropTypes.string,
5354
children: PropTypes.node.isRequired
5455
}

0 commit comments

Comments
 (0)