@@ -4,36 +4,10 @@ import { grpc } from 'grpc-web-client';
4
4
import { HackerNewsService } from './proto/hackernews_pb_service' ;
5
5
import { ListStoriesRequest , ListStoriesResponse } from './proto/hackernews_pb' ;
6
6
import { Button , Container , Divider , Grid , Header , Image , Menu , Segment } from 'semantic-ui-react' ;
7
- import StoryList from './StoryList' ;
8
- import StoryView from './StoryView' ;
9
7
10
8
// const logo = require('./logo.svg');
11
9
const ThemingLayout = ( ) => (
12
- < Container style = { { marginTop : '3em' } } >
13
- < Header as = "h1" dividing = { true } > Hacker News with gRPC-Web</ Header >
14
-
15
- < Grid columns = { 2 } stackable = { true } divided = { 'vertically' } >
16
- < Grid . Column width = { 3 } >
17
- < StoryList />
18
- </ Grid . Column >
19
-
20
- < Grid . Column width = { 13 } stretched = { true } >
21
-
22
- < Header as = "h2" > Example body text</ Header >
23
- < StoryView />
24
-
25
- < p >
26
- Nullam quis risus eget < a href = "#" > urna mollis ornare</ a > vel eu leo. Cum sociis natoque penatibus et magnis
27
- dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.
28
- </ p >
29
- < p >
30
- < small > This line of text is meant to be treated as fine print.</ small >
31
- </ p >
32
- < p > The following snippet of text is < strong > rendered as bold text</ strong > .</ p >
33
- < p > The following snippet of text is < em > rendered as italicized text</ em > .</ p >
34
- < p > An abbreviation of the word attribute is < abbr title = "attribute" > attr</ abbr > .</ p >
35
- </ Grid . Column >
36
- </ Grid >
10
+ < Container style = { { marginTop : '3em' } } >
37
11
38
12
< Grid columns = { 3 } stackable = { true } >
39
13
< Grid . Column >
@@ -70,22 +44,22 @@ const ThemingLayout = () => (
70
44
columns = { 3 }
71
45
padded = { true }
72
46
stackable = { true }
73
- style = { { margin : '-1.5em' , width : 400 } }
47
+ style = { { margin : '-1.5em' , width : 400 } }
74
48
textAlign = "center"
75
49
>
76
- < Grid . Column color = "red" style = { { margin : '0.5em' , height : 50 } } > Red</ Grid . Column >
77
- < Grid . Column color = "orange" style = { { margin : '0.5em' , height : 50 } } > Orange</ Grid . Column >
78
- < Grid . Column color = "yellow" style = { { margin : '0.5em' , height : 50 } } > Yellow</ Grid . Column >
79
- < Grid . Column color = "olive" style = { { margin : '0.5em' , height : 50 } } > Olive</ Grid . Column >
80
- < Grid . Column color = "green" style = { { margin : '0.5em' , height : 50 } } > Green</ Grid . Column >
81
- < Grid . Column color = "teal" style = { { margin : '0.5em' , height : 50 } } > Teal</ Grid . Column >
82
- < Grid . Column color = "blue" style = { { margin : '0.5em' , height : 50 } } > Blue</ Grid . Column >
83
- < Grid . Column color = "violet" style = { { margin : '0.5em' , height : 50 } } > Violet</ Grid . Column >
84
- < Grid . Column color = "purple" style = { { margin : '0.5em' , height : 50 } } > Purple</ Grid . Column >
85
- < Grid . Column color = "pink" style = { { margin : '0.5em' , height : 50 } } > Pink</ Grid . Column >
86
- < Grid . Column color = "brown" style = { { margin : '0.5em' , height : 50 } } > Brown</ Grid . Column >
87
- < Grid . Column color = "grey" style = { { margin : '0.5em' , height : 50 } } > Grey</ Grid . Column >
88
- < Grid . Column color = "black" style = { { margin : '0.5em' , height : 50 } } > Black</ Grid . Column >
50
+ < Grid . Column color = "red" style = { { margin : '0.5em' , height : 50 } } > Red</ Grid . Column >
51
+ < Grid . Column color = "orange" style = { { margin : '0.5em' , height : 50 } } > Orange</ Grid . Column >
52
+ < Grid . Column color = "yellow" style = { { margin : '0.5em' , height : 50 } } > Yellow</ Grid . Column >
53
+ < Grid . Column color = "olive" style = { { margin : '0.5em' , height : 50 } } > Olive</ Grid . Column >
54
+ < Grid . Column color = "green" style = { { margin : '0.5em' , height : 50 } } > Green</ Grid . Column >
55
+ < Grid . Column color = "teal" style = { { margin : '0.5em' , height : 50 } } > Teal</ Grid . Column >
56
+ < Grid . Column color = "blue" style = { { margin : '0.5em' , height : 50 } } > Blue</ Grid . Column >
57
+ < Grid . Column color = "violet" style = { { margin : '0.5em' , height : 50 } } > Violet</ Grid . Column >
58
+ < Grid . Column color = "purple" style = { { margin : '0.5em' , height : 50 } } > Purple</ Grid . Column >
59
+ < Grid . Column color = "pink" style = { { margin : '0.5em' , height : 50 } } > Pink</ Grid . Column >
60
+ < Grid . Column color = "brown" style = { { margin : '0.5em' , height : 50 } } > Brown</ Grid . Column >
61
+ < Grid . Column color = "grey" style = { { margin : '0.5em' , height : 50 } } > Grey</ Grid . Column >
62
+ < Grid . Column color = "black" style = { { margin : '0.5em' , height : 50 } } > Black</ Grid . Column >
89
63
</ Grid >
90
64
</ Grid . Column >
91
65
</ Grid >
@@ -96,9 +70,9 @@ const ThemingLayout = () => (
96
70
< Grid . Column >
97
71
< Menu
98
72
items = { [
99
- { key : '1' , name : 'link-1' , content : 'Link' } ,
100
- { key : '2' , name : 'link-2' , content : 'Link' } ,
101
- { key : '3' , name : 'link-3' , content : 'Link' } ,
73
+ { key : '1' , name : 'link-1' , content : 'Link' } ,
74
+ { key : '2' , name : 'link-2' , content : 'Link' } ,
75
+ { key : '3' , name : 'link-3' , content : 'Link' } ,
102
76
] }
103
77
pointing = { true }
104
78
secondary = { true }
@@ -108,9 +82,9 @@ const ThemingLayout = () => (
108
82
< Grid . Column >
109
83
< Menu
110
84
items = { [
111
- { key : '1' , name : 'link-1' , content : 'Link' } ,
112
- { key : '2' , name : 'link-2' , content : 'Link' } ,
113
- { key : '3' , name : 'link-3' , content : 'Link' } ,
85
+ { key : '1' , name : 'link-1' , content : 'Link' } ,
86
+ { key : '2' , name : 'link-2' , content : 'Link' } ,
87
+ { key : '3' , name : 'link-3' , content : 'Link' } ,
114
88
] }
115
89
pointing = { true }
116
90
tabular = { true }
@@ -120,9 +94,9 @@ const ThemingLayout = () => (
120
94
< Grid . Column >
121
95
< Menu
122
96
items = { [
123
- { key : 'l1' , name : 'link-1' , content : 'Link' } ,
124
- { key : 'l2' , name : 'link-2' , content : 'Link' } ,
125
- { key : 't1' , name : 'text-1' , content : 'Right text' , position : 'right' } ,
97
+ { key : 'l1' , name : 'link-1' , content : 'Link' } ,
98
+ { key : 'l2' , name : 'link-2' , content : 'Link' } ,
99
+ { key : 't1' , name : 'text-1' , content : 'Right text' , position : 'right' } ,
126
100
] }
127
101
pointing = { true }
128
102
/>
@@ -139,19 +113,19 @@ const ThemingLayout = () => (
139
113
< Button basic = { true } > Basic</ Button >
140
114
< Button compact = { true } > Compact</ Button >
141
115
142
- < Divider />
116
+ < Divider />
143
117
144
- < Button icon = "heart" />
145
- < Button content = "Labeled" icon = "heart" labelPosition = "left" />
146
- < Button content = "Labeled" icon = "heart" labelPosition = "right" />
118
+ < Button icon = "heart" />
119
+ < Button content = "Labeled" icon = "heart" labelPosition = "left" />
120
+ < Button content = "Labeled" icon = "heart" labelPosition = "right" />
147
121
148
- < Divider />
122
+ < Divider />
149
123
150
124
< Button . Group >
151
125
< Button > Combo</ Button >
152
126
</ Button . Group >
153
127
154
- < Divider />
128
+ < Divider />
155
129
156
130
< Button animated = { true } >
157
131
< Button . Content visible = { true } > Horizontal</ Button . Content >
@@ -166,12 +140,12 @@ const ThemingLayout = () => (
166
140
< Button . Content hidden = { true } > Hidden</ Button . Content >
167
141
</ Button >
168
142
169
- < Divider />
143
+ < Divider />
170
144
171
145
< Button disabled = { true } > Disabled</ Button >
172
146
< Button loading = { true } > Loading</ Button >
173
147
174
- < Divider />
148
+ < Divider />
175
149
176
150
< Button . Group >
177
151
< Button > 1</ Button >
@@ -180,26 +154,26 @@ const ThemingLayout = () => (
180
154
</ Button . Group >
181
155
182
156
< Button . Group >
183
- < Button icon = "align left" />
184
- < Button icon = "align center" />
185
- < Button icon = "align right" />
186
- < Button icon = "align justify" />
157
+ < Button icon = "align left" />
158
+ < Button icon = "align center" />
159
+ < Button icon = "align right" />
160
+ < Button icon = "align justify" />
187
161
</ Button . Group >
188
162
189
163
< Button . Group >
190
164
< Button > 1</ Button >
191
- < Button . Or />
165
+ < Button . Or />
192
166
< Button > 2</ Button >
193
167
</ Button . Group >
194
168
195
- < Divider />
169
+ < Divider />
196
170
197
171
< Button . Group attached = "top" widths = { 2 } >
198
172
< Button > One</ Button >
199
173
< Button > Two</ Button >
200
174
</ Button . Group >
201
175
< Segment attached = { true } >
202
- < Image src = "/assets/images/wireframe/paragraph.png" />
176
+ < Image src = "/assets/images/wireframe/paragraph.png" />
203
177
</ Segment >
204
178
< Button . Group attached = "bottom" widths = { 2 } >
205
179
< Button > One</ Button >
@@ -216,19 +190,19 @@ const ThemingLayout = () => (
216
190
< Button size = "huge" > Huge</ Button >
217
191
< Button size = "massive" > Massive</ Button >
218
192
219
- < Divider />
193
+ < Divider />
220
194
221
- < Button color = "yellow" style = { { marginBottom : '1em' } } > Yellow</ Button >
222
- < Button color = "orange" style = { { marginBottom : '1em' } } > Orange</ Button >
223
- < Button color = "green" style = { { marginBottom : '1em' } } > Green</ Button >
224
- < Button color = "teal" style = { { marginBottom : '1em' } } > Teal</ Button >
225
- < Button color = "blue" style = { { marginBottom : '1em' } } > Blue</ Button >
226
- < Button color = "purple" style = { { marginBottom : '1em' } } > Purple</ Button >
227
- < Button color = "pink" style = { { marginBottom : '1em' } } > Pink</ Button >
228
- < Button color = "red" style = { { marginBottom : '1em' } } > Red</ Button >
229
- < Button color = "black" style = { { marginBottom : '1em' } } > Black</ Button >
195
+ < Button color = "yellow" style = { { marginBottom : '1em' } } > Yellow</ Button >
196
+ < Button color = "orange" style = { { marginBottom : '1em' } } > Orange</ Button >
197
+ < Button color = "green" style = { { marginBottom : '1em' } } > Green</ Button >
198
+ < Button color = "teal" style = { { marginBottom : '1em' } } > Teal</ Button >
199
+ < Button color = "blue" style = { { marginBottom : '1em' } } > Blue</ Button >
200
+ < Button color = "purple" style = { { marginBottom : '1em' } } > Purple</ Button >
201
+ < Button color = "pink" style = { { marginBottom : '1em' } } > Pink</ Button >
202
+ < Button color = "red" style = { { marginBottom : '1em' } } > Red</ Button >
203
+ < Button color = "black" style = { { marginBottom : '1em' } } > Black</ Button >
230
204
231
- < Divider />
205
+ < Divider />
232
206
233
207
< Segment inverted = { true } >
234
208
< Button inverted = { true } > Inverted</ Button >
@@ -276,7 +250,10 @@ class App extends React.Component {
276
250
277
251
render ( ) {
278
252
return (
279
- < ThemingLayout />
253
+ < Container style = { { marginTop : '3em' } } >
254
+ < ThemingLayout />
255
+ </ Container >
256
+
280
257
) ;
281
258
}
282
259
}
0 commit comments