Skip to content

Commit dbc70be

Browse files
committed
[refactor] upgrade Cell Router & TypeScript
1 parent 566bdb3 commit dbc70be

File tree

26 files changed

+233
-210
lines changed

26 files changed

+233
-210
lines changed

document/source/components/Button.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ import { render, createCell, Fragment } from 'web-cell';
8585
import { Button } from 'boot-cell/source/Form/Button';
8686

8787
render(
88-
<Fragment>
88+
<>
8989
<Button href="https://web-cell.dev/">Link</Button>
9090
<Button type="submit">Button</Button>
9191
<Button>Input</Button>
9292
<Button type="submit">Submit</Button>
9393
<Button type="reset">Reset</Button>
94-
</Fragment>
94+
</>
9595
);
9696
```
9797

@@ -155,12 +155,12 @@ import { render, createCell, Fragment } from 'web-cell';
155155
import { Button } from 'boot-cell/source/Form/Button';
156156

157157
render(
158-
<Fragment>
158+
<>
159159
<Button size="lg">Large button</Button>
160160
<Button color="secondary" size="lg">
161161
Large button
162162
</Button>
163-
</Fragment>
163+
</>
164164
);
165165
```
166166

@@ -176,12 +176,12 @@ import { render, createCell, Fragment } from 'web-cell';
176176
import { Button } from 'boot-cell/source/Form/Button';
177177

178178
render(
179-
<Fragment>
179+
<>
180180
<Button size="sm">Small button</Button>
181181
<Button color="secondary" size="sm">
182182
Small button
183183
</Button>
184-
</Fragment>
184+
</>
185185
);
186186
```
187187

@@ -201,14 +201,14 @@ import { render, createCell, Fragment } from 'web-cell';
201201
import { Button } from 'boot-cell/source/Form/Button';
202202

203203
render(
204-
<Fragment>
204+
<>
205205
<Button size="lg" block>
206206
Block level button
207207
</Button>
208208
<Button color="secondary" size="lg" block>
209209
Block level button
210210
</Button>
211-
</Fragment>
211+
</>
212212
);
213213
```
214214

@@ -239,7 +239,7 @@ import { render, createCell, Fragment } from 'web-cell';
239239
import { Button } from 'boot-cell/source/Form/Button';
240240

241241
render(
242-
<Fragment>
242+
<>
243243
<Button size="lg" className="active" aria-pressed="true" href="#">
244244
Primary link
245245
</Button>
@@ -252,7 +252,7 @@ render(
252252
>
253253
Link
254254
</Button>
255-
</Fragment>
255+
</>
256256
);
257257
```
258258

@@ -274,14 +274,14 @@ import { render, createCell, Fragment } from 'web-cell';
274274
import { Button } from 'boot-cell/source/Form/Button';
275275

276276
render(
277-
<Fragment>
277+
<>
278278
<Button size="lg" disabled>
279279
Primary button
280280
</Button>
281281
<Button color="secondary" size="lg" disabled>
282282
Button
283283
</Button>
284-
</Fragment>
284+
</>
285285
);
286286
```
287287

@@ -299,14 +299,14 @@ import { render, createCell, Fragment } from 'web-cell';
299299
import { Button } from 'boot-cell/source/Form/Button';
300300

301301
render(
302-
<Fragment>
302+
<>
303303
<Button size="lg" href="https://web-cell.dev/" disabled>
304304
Primary button
305305
</Button>
306306
<Button color="secondary" size="lg" href="https://web-cell.dev/" disabled>
307307
Button
308308
</Button>
309-
</Fragment>
309+
</>
310310
);
311311
```
312312

document/source/components/ButtonGroup.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ import { Button } from 'boot-cell/source/Form/Button';
137137
import { InputGroup } from 'boot-cell/source/Form/InputGroup';
138138

139139
render(
140-
<Fragment>
140+
<>
141141
<Toolbar aria-label="Toolbar with button groups">
142142
<ButtonGroup className="mr-2" aria-label="First group">
143143
{[1, 2, 3, 4].map(index => (
@@ -165,7 +165,7 @@ render(
165165
prepend="@"
166166
/>
167167
</Toolbar>
168-
</Fragment>
168+
</>
169169
);
170170
```
171171

@@ -198,7 +198,7 @@ import { ButtonGroup } from 'boot-cell/source/Form/ButtonGroup';
198198
import { Button } from 'boot-cell/source/Form/Button';
199199

200200
render(
201-
<Fragment>
201+
<>
202202
<ButtonGroup size="lg">
203203
{['Left', 'Middle', 'Right'].map(text => (
204204
<Button color="secondary">{text}</Button>
@@ -214,7 +214,7 @@ render(
214214
<Button color="secondary">{text}</Button>
215215
))}
216216
</ButtonGroup>
217-
</Fragment>
217+
</>
218218
);
219219
```
220220

@@ -275,7 +275,7 @@ Make a set of buttons appear vertically stacked rather than horizontally.
275275
<Example>
276276
<ButtonGroup vertical>
277277
{[1, 2].map(() => (
278-
<Fragment>
278+
<>
279279
<Button color="secondary">Button</Button>
280280
<Button color="secondary">Button</Button>
281281
<DropMenu
@@ -286,7 +286,7 @@ Make a set of buttons appear vertically stacked rather than horizontally.
286286
<DropMenuItem>Dropdown link</DropMenuItem>
287287
<DropMenuItem>Dropdown link</DropMenuItem>
288288
</DropMenu>
289-
</Fragment>
289+
</>
290290
))}
291291
{[1, 2].map(() => (
292292
<DropMenu
@@ -310,7 +310,7 @@ import { DropMenu, DropMenuItem } from 'boot-cell/source/Navigator/DropMenu';
310310
render(
311311
<ButtonGroup vertical>
312312
{[1, 2].map(() => (
313-
<Fragment>
313+
<>
314314
<Button color="secondary">Button</Button>
315315
<Button color="secondary">Button</Button>
316316
<DropMenu
@@ -321,7 +321,7 @@ render(
321321
<DropMenuItem>Dropdown link</DropMenuItem>
322322
<DropMenuItem>Dropdown link</DropMenuItem>
323323
</DropMenu>
324-
</Fragment>
324+
</>
325325
))}
326326
{[1, 2].map(() => (
327327
<DropMenu

document/source/components/Collapse.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import 'boot-cell/source/Content/Collapse';
4949
import { Button } from 'boot-cell/source/Form/Button';
5050

5151
render(
52-
<Fragment>
52+
<>
5353
<Button
5454
onClick={({ currentTarget }) => {
5555
const box = currentTarget.nextElementSibling;
@@ -65,7 +65,7 @@ render(
6565
>
6666
Web Components engine based on JSX &amp; TypeScript
6767
</collapse-box>
68-
</Fragment>
68+
</>
6969
);
7070
```
7171

document/source/components/Dialog.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ import { openDialog, Modal } from 'boot-cell/source/Prompt/Dialog';
209209
import { Button } from 'boot-cell/source/Form/Button';
210210

211211
render(
212-
<Fragment>
212+
<>
213213
<Button
214214
onClick={() =>
215215
openDialog(
@@ -237,7 +237,7 @@ render(
237237
>
238238
Vertically centered scrollable modal
239239
</Button>
240-
</Fragment>
240+
</>
241241
);
242242
```
243243

document/source/components/DropMenu.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ import { render, createCell, Fragment } from 'web-cell';
190190
import { DropMenu, DropMenuItem } from 'boot-cell/source/Navigator/DropMenu';
191191

192192
render(
193-
<Fragment>
193+
<>
194194
<DropMenu buttonSize="lg" caption="Large button">
195195
<DropMenuItem>Action</DropMenuItem>
196196
<DropMenuItem>Another action</DropMenuItem>
@@ -209,7 +209,7 @@ render(
209209
<DropMenuItem />
210210
<DropMenuItem>Separated link</DropMenuItem>
211211
</DropMenu>
212-
</Fragment>
212+
</>
213213
);
214214
```
215215

document/source/components/FAIcon.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ import { render, createCell, Fragment } from 'web-cell';
188188
import { FAIcon } from 'boot-cell/source/Reminder/FAIcon';
189189

190190
render(
191-
<Fragment>
191+
<>
192192
<FAIcon name="quote-left" size={2} pull="left" />
193193
Gatsby believed in the green light, the orgastic future that year by year recedes
194194
before us. It eluded us then, but that’s no matter — tomorrow we will run faster,
195195
stretch our arms further... And one fine morning — So we beat on, boats against
196196
the current, borne back ceaselessly into the past.
197-
</Fragment>
197+
</>
198198
);
199199
```
200200

@@ -213,13 +213,13 @@ import { render, createCell, Fragment } from 'web-cell';
213213
import { FAIcon } from 'boot-cell/source/Reminder/FAIcon';
214214

215215
render(
216-
<Fragment>
216+
<>
217217
<FAIcon name="arrow-right" size={2} pull="right" border />
218218
Gatsby believed in the green light, the orgastic future that year by year recedes
219219
before us. It eluded us then, but that’s no matter — tomorrow we will run faster,
220220
stretch our arms further... And one fine morning — So we beat on, boats against
221221
the current, borne back ceaselessly into the past.
222-
</Fragment>
222+
</>
223223
);
224224
```
225225

@@ -363,7 +363,7 @@ import { render, createCell, Fragment } from 'web-cell';
363363
import { FAIcon, BGIcon } from 'boot-cell/source/Reminder/FAIcon';
364364

365365
render(
366-
<Fragment>
366+
<>
367367
<BGIcon type="square" group="brands" name="twitter" size={2} />
368368
<BGIcon type="circle" name="flag" size={2} />
369369
<BGIcon type="square" name="terminal" size={2} />
@@ -372,7 +372,7 @@ render(
372372
<FAIcon name="camera" stack={1} />
373373
<FAIcon name="ban" stack={2} color="danger" />
374374
</span>
375-
</Fragment>
375+
</>
376376
);
377377
```
378378

document/source/components/FormField.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ import { render, createCell, Fragment } from 'web-cell';
132132
import { FormField } from 'boot-cell/source/Form/FormField';
133133

134134
render(
135-
<Fragment>
135+
<>
136136
<FormField size="lg" placeholder=".form-control-lg" />
137137
<FormField placeholder="Default input" />
138138
<FormField size="sm" placeholder=".form-control-sm" />
139-
</Fragment>
139+
</>
140140
);
141141
```
142142

@@ -1137,14 +1137,14 @@ import { render, createCell, Fragment } from 'web-cell';
11371137
import { ToggleField } from 'boot-cell/source/Form/ToggleField';
11381138

11391139
render(
1140-
<Fragment>
1140+
<>
11411141
<ToggleField type="radio" name="customRadio">
11421142
Toggle this custom radio
11431143
</ToggleField>
11441144
<ToggleField type="radio" name="customRadio">
11451145
Or toggle this other custom radio
11461146
</ToggleField>
1147-
</Fragment>
1147+
</>
11481148
);
11491149
```
11501150

@@ -1164,14 +1164,14 @@ import { render, createCell, Fragment } from 'web-cell';
11641164
import { ToggleField } from 'boot-cell/source/Form/ToggleField';
11651165

11661166
render(
1167-
<Fragment>
1167+
<>
11681168
<ToggleField type="radio" name="customRadio" inline>
11691169
Toggle this custom radio
11701170
</ToggleField>
11711171
<ToggleField type="radio" name="customRadio" inline>
11721172
Or toggle this other custom radio
11731173
</ToggleField>
1174-
</Fragment>
1174+
</>
11751175
);
11761176
```
11771177

@@ -1195,14 +1195,14 @@ import { render, createCell, Fragment } from 'web-cell';
11951195
import { ToggleField } from 'boot-cell/source/Form/ToggleField';
11961196

11971197
render(
1198-
<Fragment>
1198+
<>
11991199
<ToggleField type="checkbox" disabled>
12001200
Check this custom checkbox
12011201
</ToggleField>
12021202
<ToggleField type="radio" disabled>
12031203
Toggle this custom radio
12041204
</ToggleField>
1205-
</Fragment>
1205+
</>
12061206
);
12071207
```
12081208

@@ -1225,14 +1225,14 @@ import { render, createCell, Fragment } from 'web-cell';
12251225
import { ToggleField } from 'boot-cell/source/Form/ToggleField';
12261226

12271227
render(
1228-
<Fragment>
1228+
<>
12291229
<ToggleField type="checkbox" switch>
12301230
Toggle this switch element
12311231
</ToggleField>
12321232
<ToggleField type="checkbox" switch disabled>
12331233
Disabled switch element
12341234
</ToggleField>
1235-
</Fragment>
1235+
</>
12361236
);
12371237
```
12381238

@@ -1285,7 +1285,7 @@ import { render, createCell, Fragment } from 'web-cell';
12851285
import { FormField } from 'boot-cell/source/Form/FormField';
12861286

12871287
render(
1288-
<Fragment>
1288+
<>
12891289
<FormField is="select" size="lg">
12901290
<option selected>Open this select menu</option>
12911291
{['One', 'Two', 'Three'].map((text, index) => (
@@ -1298,7 +1298,7 @@ render(
12981298
<option value={index + 1}>{text}</option>
12991299
))}
13001300
</FormField>
1301-
<Fragment>
1301+
<>
13021302
);
13031303
```
13041304

0 commit comments

Comments
 (0)