Skip to content

Commit dd56391

Browse files
committed
2 parents f251f5d + 4d9a62b commit dd56391

File tree

10 files changed

+136
-104
lines changed

10 files changed

+136
-104
lines changed

docs_src/content/docs/00-introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44

55
#### What is NativeScript?
66

7-
[NativeScript](https://www.nativescript.org/) is an open-source framework to develop apps on the Apple iOS and Android platforms. It is open source and can be found on [github](https://github.com/nativescript/nativescript)
7+
[NativeScript](https://www.nativescript.org/) is an open-source framework to develop apps on the Apple iOS and Android platforms. It is open source and can be found on [github](https://github.com/nativescript/nativescript).
88

99
#### What is Svelte?
1010

docs_src/content/docs/01-getting-started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Svelte-Native works on top of NativeScript. To install NativeScript:
1212
$ npm install -g nativescript
1313
```
1414

15-
Check it worked by running `tns`
15+
Check it worked by running `tns`:
1616

1717
![Success](/media/tns-success.png)
1818

@@ -42,7 +42,7 @@ $ cd myapp
4242
$ tns preview
4343
```
4444

45-
You will need to scan the ascii art QR code using the "Playground" app you installed previously.
45+
You will need to scan the QR Code using the "Playground" app you installed previously.
4646

4747
<img src="/media/quick-start-screenshot.png" width=200 alt="Running App" >
4848

@@ -69,4 +69,3 @@ or
6969
```bash
7070
$ tns run ios
7171
```
72-

docs_src/content/docs/10-routing.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ navigate({
6363
```
6464

6565
The value for the `frame` option can be one of the following:
66+
6667
* the `id` of the `<frame>` component (for example: `<frame id="main-frame">`)
6768
* a reference to the `<frame>` (for example: `<frame bind:this="{mainFrame}">`)
6869
* a NativeScript `Frame` instance.
@@ -110,10 +111,10 @@ To show a page or component modally use the `showModal` function. Specify the pa
110111
```html
111112
<!--{ filename: 'App.svelte'} -->
112113
<page>
113-
<actionBar title="Master" />
114-
<stackLayout>
115-
<button text="Open Modal" on:tap="{launchModal}" />
116-
</stackLayout>
114+
<actionBar title="Master" />
115+
<stackLayout>
116+
<button text="Open Modal" on:tap="{launchModal}" />
117+
</stackLayout>
117118
</page>
118119

119120
<script>
@@ -129,7 +130,7 @@ To show a page or component modally use the `showModal` function. Specify the pa
129130
<!--{filename: "DetailPage.svelte" }-->
130131
<frame id="detail-page-frame">
131132
<page>
132-
133+
<label text="Detail Page" />
133134
</page>
134135
</frame>
135136
```
@@ -153,6 +154,7 @@ The `closeModal` function closes the current modal view and optionally returns a
153154
<label text="{modalResult}" />
154155
</stackLayout>
155156
</page>
157+
156158
<script>
157159
import DetailPage from './DetailPage.svelte'
158160
import { showModal } from 'svelte-native'
@@ -172,6 +174,7 @@ The `closeModal` function closes the current modal view and optionally returns a
172174
<button text="Close me" on:tap="{ () => closeModal('hi from modal') }" />
173175
</page>
174176
</frame>
177+
175178
<script>
176179
import { closeModal } from 'svelte-native'
177180
</script>

docs_src/content/docs/30-layouts.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The following example creates a simple grid. For more information about creating
2626
<label text="120,120" left="120" top="120" width="100" height="100" backgroundColor="#4383b8"/>
2727
</absoluteLayout>
2828
```
29+
2930
<img width=320 src="/media/docs/layouts/absolute_layout_grid.svg" />
3031

3132
#### Overlapping elements
@@ -38,6 +39,7 @@ The following example creates a group of overlapping items.
3839
<label text="30,40" left="30" top="40" width="100" height="100" backgroundColor="#4383b8"/>
3940
</absoluteLayout>
4041
```
42+
4143
<img width=320 src="/media/docs/layouts/absolute_layout_overlap.svg" />
4244

4345
#### Additional children props
@@ -51,9 +53,9 @@ When an element is a direct child of `<absoluteLayout>`, you can work with the f
5153

5254
### DockLayout
5355

54-
`<DockLayout>` is a layout container that lets you dock child elements to the sides or the center of the layout.
56+
`<dockLayout>` is a layout container that lets you dock child elements to the sides or the center of the layout.
5557

56-
`<DockLayout>` has the following behavior:
58+
`<dockLayout>` has the following behavior:
5759

5860
* Uses the `dock` property to dock its children to the `left`, `right`, `top`, `bottom` or center of the layout.<br/>To dock a child element to the center, it must be the **last child** of the container and you must set the `stretchLastChild` property of the parent to `true`.
5961
* Enforces layout constraints to its children.
@@ -126,15 +128,15 @@ The following example creates a single line of 4 elements that stretch across th
126128

127129
#### Additional children props
128130

129-
When an element is a direct child of `<DockLayout>`, you can work with the following additional properties.
131+
When an element is a direct child of `<dockLayout>`, you can work with the following additional properties.
130132

131133
| Name | Type | Description |
132134
|------|------|-------------|
133135
| `dock` | `String` | Specifies which side to dock the element to.<br/>Valid values: `top`, `right`, `bottom`, or `left`.
134136

135137
### FlexboxLayout
136138

137-
`<FlexboxLayout>` is a layout container that provides a non-exact implementation of the [CSS Flexbox layout](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox). This layout lets you arrange child components both horizontally and vertically.
139+
`<flexboxLayout>` is a layout container that provides a non-exact implementation of the [CSS Flexbox layout](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Flexbox). This layout lets you arrange child components both horizontally and vertically.
138140

139141
#### Examples
140142

@@ -202,6 +204,7 @@ The following example creates four items with enabled line wrapping. When the ro
202204
<label text="fourth" width="30%" backgroundColor="#286290"/>
203205
</flexboxLayout>
204206
```
207+
205208
<img width=320 src="/media/docs/layouts/flexbox_layout_wrap.svg" />
206209

207210
#### Column flex layout with reverse order and items with a different `alignSelf`
@@ -236,7 +239,7 @@ The following example shows how to use:
236239

237240
#### Additional children props
238241

239-
When an element is a direct child of `<FlexboxLayout>`, you can work with the following additional properties.
242+
When an element is a direct child of `<flexboxLayout>`, you can work with the following additional properties.
240243

241244
| Name | Type | Description |
242245
|------|------|-------------|
@@ -248,11 +251,11 @@ When an element is a direct child of `<FlexboxLayout>`, you can work with the fo
248251

249252
### GridLayout
250253

251-
`<GridLayout>` is a layout container that lets you arrange its child elements in a table-like manner.
254+
`<gridLayout>` is a layout container that lets you arrange its child elements in a table-like manner.
252255

253256
The grid consists of rows, columns, and cells. A cell can span one or more rows and one or more columns. It can contain multiple child elements which can span over multiple rows and columns, and even overlap each other.
254257

255-
By default, `<GridLayout>` has one column and one row. You can add columns and rows by configuring the `columns` and the `rows` properties. In these properties, you need to set the number of columns and rows and their width and height. You set the number of columns by listing their widths, separated by a comma. You set the number of rows by listing their heights, separated by a comma.
258+
By default, `<gridLayout>` has one column and one row. You can add columns and rows by configuring the `columns` and the `rows` properties. In these properties, you need to set the number of columns and rows and their width and height. You set the number of columns by listing their widths, separated by a comma. You set the number of rows by listing their heights, separated by a comma.
256259

257260
You can set a fixed size for column width and row height or you can create them in a responsive manner:
258261

@@ -289,6 +292,7 @@ The following example creates a grid with responsive design, where space is alot
289292
<Label text="1,1" row="1" col="1" backgroundColor="#4383b8"/>
290293
</gridLayout>
291294
```
295+
292296
<img width=320 src="/media/docs/layouts/grid_layout_star_sizing.svg" />
293297

294298
#### Grid layout with fixed and auto sizing
@@ -303,6 +307,7 @@ The following example create a grid with one auto-sized column and one column wi
303307
<label text="1,1" row="1" col="1" backgroundColor="#4383b8"/>
304308
</gridLayout>
305309
```
310+
306311
<img width=320 src="/media/docs/layouts/grid_layout_fixed_auto.svg" />
307312

308313
#### Grid layout with mixed sizing and merged cells
@@ -320,6 +325,7 @@ The following example creates a complex grid with responsive design, mixed width
320325
<label text="2,2" row="2" col="2" backgroundColor="#4383b8"/>
321326
</gridLayout>
322327
```
328+
323329
<img width=320 src="/media/docs/layouts/grid_layout_complex.svg" />
324330

325331
#### Props
@@ -331,7 +337,7 @@ The following example creates a complex grid with responsive design, mixed width
331337

332338
#### Additional children props
333339

334-
When an element is a direct child of `<GridLayout>`, you can work with the following additional properties.
340+
When an element is a direct child of `<gridLayout>`, you can work with the following additional properties.
335341

336342
| Name | Type | Description |
337343
|------|------|-------------|
@@ -371,6 +377,7 @@ The following example creates a horizontal stack of 3 equally-sized elements. It
371377
<label text="third" width="70" backgroundColor="#1c486b"/>
372378
</stackLayout>
373379
```
380+
374381
<img width=320 src="/media/docs/layouts/stack_layout_horizontal.svg" />
375382

376383
#### Stack layout with horizontally aligned children
@@ -419,7 +426,7 @@ The following example creates a diagonal stack of items with responsive sizes. I
419426

420427
### WrapLayout
421428

422-
`<WrapLayout>` is a layout container that lets you position items in rows or columns, based on the `orientation` property. When the space is filled, the container automatically wraps items onto a new row or column.
429+
`<wrapLayout>` is a layout container that lets you position items in rows or columns, based on the `orientation` property. When the space is filled, the container automatically wraps items onto a new row or column.
423430

424431
#### Examples
425432

docs_src/content/docs/35-action-bars.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: ActionBars
66

77
<div class="nsref"><a title="NativeScript Documentation" href="https://docs.nativescript.org/api-reference/classes/_ui_action_bar_.actionbar">Class Docs</a></div>
88

9-
`<actionBar>` is a UI component that provides a toolbar at the top of the activity window.
9+
`<actionBar>` is a UI component that provides a toolbar at the top of the activity window.
1010

1111
This component is the NativeScript abstraction for the Android [app bar](https://developer.android.com/training/appbar/) and the iOS [navigation bar](https://developer.apple.com/design/human-interface-guidelines/ios/bars/navigation-bars/).
1212

@@ -128,10 +128,10 @@ Extends [`<actionItem>`](docs#actionitem).
128128

129129
| Name | Description |
130130
|------|-------------|
131-
| `tap`| Emitted when the `<NavigationButton>` is tapped.
131+
| `tap`| Emitted when the `<navigationButton>` is tapped.
132132

133133
#### Native component
134134

135135
| Android | iOS |
136136
|---------|-----|
137-
| [`android.widget.Toolbar`](https://developer.android.com/reference/android/widget/Toolbar.html) | [`UINavigationItem`](https://developer.apple.com/documentation/uikit/uinavigationitem)
137+
| [`android.widget.Toolbar`](https://developer.android.com/reference/android/widget/Toolbar.html) | [`UINavigationItem`](https://developer.apple.com/documentation/uikit/uinavigationitem)

docs_src/content/docs/37-tab-navigation.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ The TabStrip component is only valid within [`BottomNavigation`](docs#bottom-nav
1111
```html
1212
<tabStrip>
1313
<tabStripItem>
14-
<label text="Home"></Label>
15-
<image src="font://&#xf015;" class="fas t-36"></image>
14+
<label text="Home" />
15+
<image src="font://&#xf015;" class="fas t-36" />
1616
</tabStripItem>
1717
<tabStripItem>
18-
<label text="Account"></Label>
19-
<image src="font://&#xf007;" class="fas t-36"></image>
18+
<label text="Account" />
19+
<image src="font://&#xf007;" class="fas t-36" />
2020
</tabStripItem>
2121
</tabStrip>
2222
```
@@ -43,8 +43,8 @@ Tab strip items define the display of a tab selector within a [`TabStrip`](docs#
4343
```html
4444
<tabStrip>
4545
<tabStripItem>
46-
<label text="Home"></Label>
47-
<image src="font://&#xf015;" class="fas t-36"></image>
46+
<label text="Home" />
47+
<image src="font://&#xf015;" class="fas t-36" />
4848
</tabStripItem>
4949
...
5050
</tabStrip>
@@ -74,7 +74,7 @@ A `TabContentItem` contains the view to be displayed when the corresponding TabS
7474
```html
7575
<tabContentitem>
7676
<stackLayout>
77-
<label>Hello From This Tab</label>
77+
<label text="Hello From This Tab" />
7878
</stackLayout>
7979
</tabContentItem>
8080
```
@@ -101,33 +101,33 @@ It can contain a single [`TabStrip`](docs#tabstrip) child (which contains multip
101101
<!-- The bottom tab UI is created via TabStrip (the containier) and TabStripItem (for each tab)-->
102102
<tabStrip>
103103
<tabStripItem>
104-
<label text="Home"></label>
105-
<image src="font://&#xf015;" class="fas t-36"></image>
104+
<label text="Home" />
105+
<image src="font://&#xf015;" class="fas t-36" />
106106
</tabStripItem>
107107
<tabStripItem class="special">
108-
<label text="Account"></label>
109-
<image src="font://&#xf007;" class="fas t-36"></image>
108+
<label text="Account" />
109+
<image src="font://&#xf007;" class="fas t-36" />
110110
</tabStripItem>
111111
<tabStripItem class="special">
112-
<label text="Search"></label>
113-
<image src="font://&#xf00e;" class="fas t-36"></image>
112+
<label text="Search" />
113+
<image src="font://&#xf00e;" class="fas t-36" />
114114
</tabStripItem>
115115
</tabStrip>
116116

117117
<!-- The number of TabContentItem components should corespond to the number of TabStripItem components -->
118118
<tabContentItem>
119119
<gridLayout>
120-
<label text="Home Page" class="h2 text-center"></label>
120+
<label text="Home Page" class="h2 text-center" />
121121
</gridLayout>
122122
</tabContentItem>
123123
<tabContentItem>
124124
<gridLayout>
125-
<label text="Account Page" class="h2 text-center"></label>
125+
<label text="Account Page" class="h2 text-center" />
126126
</gridLayout>
127127
</tabContentItem>
128128
<tabContentItem>
129129
<gridLayout>
130-
<label text="Search Page" class="h2 text-center"></label>
130+
<label text="Search Page" class="h2 text-center" />
131131
</gridLayout>
132132
</tabContentItem>
133133

@@ -171,33 +171,33 @@ Unlike the [`Bottom Navigation`](docs#bottom-navigation) component, The tabs com
171171
<!-- The bottom tab UI is created via TabStrip (the containier) and TabStripItem (for each tab)-->
172172
<tabStrip>
173173
<tabStripItem>
174-
<label text="Home"></label>
175-
<image src="font://&#xf015;" class="fas t-36"></image>
174+
<label text="Home" />
175+
<image src="font://&#xf015;" class="fas t-36" />
176176
</tabStripItem>
177177
<tabStripItem class="special">
178-
<label text="Account"></label>
179-
<image src="font://&#xf007;" class="fas t-36"></image>
178+
<label text="Account" />
179+
<image src="font://&#xf007;" class="fas t-36" />
180180
</tabStripItem>
181181
<tabStripItem class="special">
182-
<label text="Search"></label>
183-
<image src="font://&#xf00e;" class="fas t-36"></image>
182+
<label text="Search" />
183+
<image src="font://&#xf00e;" class="fas t-36" />
184184
</tabStripItem>
185185
</tabStrip>
186186

187187
<!-- The number of TabContentItem components should corespond to the number of TabStripItem components -->
188188
<tabContentItem>
189189
<gridLayout>
190-
<label text="Home Page" class="h2 text-center"></label>
190+
<label text="Home Page" class="h2 text-center" />
191191
</gridLayout>
192192
</tabContentItem>
193193
<tabContentItem>
194194
<gridLayout>
195-
<label text="Account Page" class="h2 text-center"></label>
195+
<label text="Account Page" class="h2 text-center" />
196196
</gridLayout>
197197
</tabContentItem>
198198
<tabContentItem>
199199
<gridLayout>
200-
<label text="Search Page" class="h2 text-center"></label>
200+
<label text="Search Page" class="h2 text-center" />
201201
</gridLayout>
202202
</tabContentItem>
203203

0 commit comments

Comments
 (0)