@@ -6,6 +6,8 @@ import Navigation from 'app/containers/Navigation';
66import Centered from 'app/components/flex/Centered' ;
77import Title from 'app/components/text/Title' ;
88import SubTitle from 'app/components/text/SubTitle' ;
9+ import MaxWidth from 'app/components/flex/MaxWidth' ;
10+ import Margin from 'app/components/spacing/Margin' ;
911import Input from 'app/components/Input' ;
1012import Button from 'app/components/buttons/Button' ;
1113import { gitHubToSandboxUrl , protocolAndHost } from 'app/utils/url-generator' ;
@@ -77,42 +79,47 @@ export default class GitHub extends React.PureComponent<{}, State> {
7779 render ( ) {
7880 const { url , transformedUrl , error } = this . state ;
7981 return (
80- < Container >
81- < Navigation title = "GitHub Import" />
82-
83- < Content vertical horizontal >
84- < Description >
85- < Title > Import from GitHub</ Title >
86- < SubTitle >
87- Enter the URL to your GitHub repository to generate a URL to your
88- sandbox. The sandbox will stay in sync with your repository.
89- </ SubTitle >
90- </ Description >
91-
92- < Label htmlFor = "githuburl" >
93- URL to GitHub Repository (supports branches and paths too)
94- </ Label >
95- < StyledInput
96- name = "githuburl"
97- value = { url }
98- onChange = { this . updateUrl }
99- placeholder = "Insert GitHub URL..."
100- />
101-
102- { error !== null && < ErrorMessage > { error } </ ErrorMessage > }
103-
104- < Label htmlFor = "sandboxurl" > Converted Sandbox URL</ Label >
105- < StyledInput
106- name = "sandboxurl"
107- value = { transformedUrl }
108- placeholder = "The Sandbox URL"
109- />
110-
111- < Button disabled = { ! transformedUrl } to = { gitHubToSandboxUrl ( url ) } >
112- Open Sandbox
113- </ Button >
114- </ Content >
115- </ Container >
82+ < MaxWidth >
83+ < Margin vertical = { 1.5 } horizontal = { 1.5 } >
84+ < Container >
85+ < Navigation title = "GitHub Import" />
86+
87+ < Content vertical horizontal >
88+ < Description >
89+ < Title > Import from GitHub</ Title >
90+ < SubTitle >
91+ Enter the URL to your GitHub repository to generate a URL to
92+ your sandbox. The sandbox will stay in sync with your
93+ repository.
94+ </ SubTitle >
95+ </ Description >
96+
97+ < Label htmlFor = "githuburl" >
98+ URL to GitHub Repository (supports branches and paths too)
99+ </ Label >
100+ < StyledInput
101+ name = "githuburl"
102+ value = { url }
103+ onChange = { this . updateUrl }
104+ placeholder = "Insert GitHub URL..."
105+ />
106+
107+ { error !== null && < ErrorMessage > { error } </ ErrorMessage > }
108+
109+ < Label htmlFor = "sandboxurl" > Converted Sandbox URL</ Label >
110+ < StyledInput
111+ name = "sandboxurl"
112+ value = { transformedUrl }
113+ placeholder = "The Sandbox URL"
114+ />
115+
116+ < Button disabled = { ! transformedUrl } to = { gitHubToSandboxUrl ( url ) } >
117+ Open Sandbox
118+ </ Button >
119+ </ Content >
120+ </ Container >
121+ </ Margin >
122+ </ MaxWidth >
116123 ) ;
117124 }
118125}
0 commit comments