Skip to content

Commit 2bb48bc

Browse files
authored
Merge pull request #426 from NativeScript/niliev/revamp
docs: components revamp
2 parents 44f7ca9 + 2ebd704 commit 2bb48bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+285
-388
lines changed

app/ng-ui-widgets-category/text-field/styling/styling.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<StackLayout class="form" sdkExampleTitle sdkToggleNavButton>
22
<!-- >> textfield-styling-props -->
33
<TextField hint="Enter text"
4-
color="whitesmoke"
4+
color="orangered"
55
backgroundColor="lightyellow">
66
</TextField>
77
<!-- << textfield-styling-props -->

app/ng-ui-widgets-category/text-view/basic-text-view/article.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

app/ng-ui-widgets-category/text-view/basic-text-view/basic-text-view.component.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

app/ng-ui-widgets-category/text-view/basic-text-view/style.css

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,49 @@
1+
## Properties
12

2-
**API Reference for the** [TextView Class](http://docs.nativescript.org/api-reference/modules/_ui_text_view_.html)
3+
| Name | Type | Description |
4+
|:---------|:---------|:---------------|
5+
| `autocapitalizationType` | [`AutocapitalizationType`](https://docs.nativescript.org/api-reference/modules/_ui_editor_text_base_#autocapitalizationtype) | Gets or sets the autocapitalization type. |
6+
| `autocorrect` | `boolean` | Enables or disables autocorrection. |
7+
| `keyboardType` | [`KeyboardType`](https://docs.nativescript.org/api-reference/modules/_ui_editor_text_base_#keyboardtype) | Gets or sets the soft keyboard type |
8+
| `letterSpacing` | `number` | Gets or sets letter space style property. |
9+
| `lineHiehgt` | `number` | Gets or sets line height style property. |
10+
| `maxLength` | `number` | Gets or sets the max number of symbols allowed as input. |
11+
| `returnKeyType` | [`ReturnKeyType`](https://docs.nativescript.org/api-reference/modules/_ui_editor_text_base_#returnkeytype) | Gets or sets the soft keyboard return key flavor. |
12+
| `secure` | `string` | Gets or sets if a text field is for password entry. |
13+
| `text` | `string` | Gets or sets the text. |
14+
| `textAlignment` | `TextAlignment` | Gets or sets the text alignment. |
15+
| `textDecoration` | `TextDecoration` | Gets or sets the text decoration. |
16+
| `textTransform` | `TextTransform` | Gets or sets the text transform. |
17+
| `whiteSpace` | `WhiteSpace` | Gets or sets white space style property. |
318

4-
**Native Component**
19+
## Methods
20+
21+
| Name | Description |
22+
|:-----------------------|:------------------------------------------------------|
23+
| `focus` | Tries to focus the view. Returns a value indicating whether this view or one of its descendants actually took focus. Returns `boolean`. |
24+
| `dismissSoftInput` | Hides the soft input method, ususally a soft keyboard. |
25+
26+
## Events
27+
28+
| Name | Description |
29+
|:-----------------------|:------------------------------------------------------|
30+
| `blur` | Emitted when the text field is unfocused. |
31+
| `focus` | Emitted when the text field is focused. |
32+
| `returnPress` | Emitted when the return key is tapped. |
33+
| `textChange` | Emitted when there is a new text input. |
34+
35+
## API References
36+
37+
| Name | Type |
38+
|----------|---------|
39+
| [tns-core-modules/ui/text-view](http://docs.nativescript.org/api-reference/modules/_ui_text_view_.html) | `Module` |
40+
| [TextView](https://docs.nativescript.org/api-reference/classes/_ui_text_view_.textview) | `Class` |
41+
42+
43+
## Native Component
544

645
| Android | iOS |
746
|:----------------------|:---------|
847
| [android.widget.EditText](http://developer.android.com/reference/android/widget/EditText.html) | [UITextView](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextView_Class/) |
48+
49+

app/ng-ui-widgets-category/text-view/metadata.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ description: TextView component is an abstraction over iOS's UITextView and Andr
44
position: 44
55
slug: text-view-ng
66
---
7+
example-order: usage, styling
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
The TextView component can be used to type large text in your app. The component can also be used show any content by setting the `editable` property to `false`.
1+
The `TextView` component can be used to type larger text content in your app. The component can also be used show any content by setting the `editable` property to `false`.

app/ng-ui-widgets-category/text-view/text-view-examples.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, ChangeDetectionStrategy } from "@angular/core";
22
import { Link } from "./../../link";
33

44
let menuLinks = [
5-
new Link("Basic TextView", "/text-view/basic")
5+
new Link("Usage", "/text-view/usage")
66
];
77

88
@Component({

app/ng-ui-widgets-category/text-view/text-view-examples.module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { NativeScriptRouterModule } from "nativescript-angular/router";
33
import { NativeScriptCommonModule } from "nativescript-angular/common";
44
import { NativeScriptFormsModule } from "nativescript-angular/forms";
55
import { TextViewExamplesComponent } from "./text-view-examples.component";
6-
import { BasicTextViewComponent } from "./basic-text-view/basic-text-view.component";
6+
import { UsageComponent } from "./usage/usage.component";
77
import { TitleAndNavButtonModule } from "../../directives/title-and-nav-button.module";
88

99
export const routerConfig = [
@@ -12,9 +12,9 @@ export const routerConfig = [
1212
component: TextViewExamplesComponent
1313
},
1414
{
15-
path: "basic",
16-
component: BasicTextViewComponent,
17-
data: { title: "Basic TextView" }
15+
path: "usage",
16+
component: UsageComponent,
17+
data: { title: "Usage" }
1818
}
1919
];
2020

@@ -27,7 +27,7 @@ export const routerConfig = [
2727
NativeScriptRouterModule,
2828
NativeScriptRouterModule.forChild(routerConfig)
2929
],
30-
declarations: [TextViewExamplesComponent, BasicTextViewComponent]
30+
declarations: [TextViewExamplesComponent, UsageComponent]
3131
})
3232

3333
export class TextViewExamplesModule {
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<snippet id='textview-html'/>
2+
<snippet id='textview-edit-disable-code'/>

0 commit comments

Comments
 (0)