@@ -7,7 +7,10 @@ import {
77 ButtonMessage ,
88 ButtonSpacer ,
99 CommonProps ,
10+ ListContainer ,
11+ MainContainer ,
1012 MessageContainer ,
13+ MessageDivider ,
1114 ReloadButton ,
1215} from "../components/Common"
1316import { NativeInfo } from "../components/NativeInfo"
@@ -80,7 +83,7 @@ export class PortChooser extends React.Component<
8083 }
8184
8285 return (
83- < div >
86+ < MainContainer >
8487 < MessageContainer >
8588 < h4 > { hostname ?? "A website" } </ h4 >
8689 < small >
@@ -89,34 +92,36 @@ export class PortChooser extends React.Component<
8992 < ReloadButton icon = "reload" onClick = { this . handleRefresh } />
9093 </ MessageContainer >
9194
92- < hr />
95+ < MessageDivider />
9396
94- { ! this . state . params &&
95- ! this . state . ports &&
96- ! this . state . error && (
97- < small > Looking for serial ports...</ small >
98- ) }
99- { this . state . params && ! this . state . ports && (
100- < NativeInstaller { ...this . state . params } />
101- ) }
102- { this . state . ports && (
103- < List
104- items = { this . state . ports . map (
105- ( port ) => port . description || port . name
97+ < ListContainer >
98+ { ! this . state . params &&
99+ ! this . state . ports &&
100+ ! this . state . error && (
101+ < small > Looking for serial ports...</ small >
106102 ) }
107- active = { this . state . active }
108- onClick = { this . handleItemClick }
109- />
110- ) }
111- { this . state . ports && this . state . ports . length == 0 && (
112- < small > No serial ports found</ small >
113- ) }
114- { this . state . error && (
115- < small >
116- Failed to enumerate serial ports:{ " " }
117- { `${ this . state . error } ` }
118- </ small >
119- ) }
103+ { this . state . params && ! this . state . ports && (
104+ < NativeInstaller { ...this . state . params } />
105+ ) }
106+ { this . state . ports && (
107+ < List
108+ items = { this . state . ports . map (
109+ ( port ) => port . description || port . name
110+ ) }
111+ active = { this . state . active }
112+ onClick = { this . handleItemClick }
113+ />
114+ ) }
115+ { this . state . ports && this . state . ports . length == 0 && (
116+ < small > No serial ports found</ small >
117+ ) }
118+ { this . state . error && (
119+ < small >
120+ Failed to enumerate serial ports:{ " " }
121+ { `${ this . state . error } ` }
122+ </ small >
123+ ) }
124+ </ ListContainer >
120125
121126 < ButtonContainer >
122127 < ButtonMessage >
@@ -135,7 +140,7 @@ export class PortChooser extends React.Component<
135140 onClick = { this . handleOkClick }
136141 />
137142 </ ButtonContainer >
138- </ div >
143+ </ MainContainer >
139144 )
140145 }
141146}
0 commit comments