-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): search and virtual scroll README refactor (#1093)
* refactor(): updated search README.md from table to list * refactor(): virtual scroll README.md to use list rather table * refactor(): match messages format
- Loading branch information
1 parent
a6d3de6
commit 0b4cb6d
Showing
7 changed files
with
149 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# TdSearchBoxComponent: td-search-box | ||
|
||
`td-search-box` element to generate a search box with animations. | ||
|
||
## API Summary | ||
|
||
#### Inputs | ||
|
||
+ backIcon?: string | ||
+ The icon used to close the search toggle, only shown when [alwaysVisible] is false. Defaults to 'search' icon. | ||
+ searchIcon?: string | ||
+ The icon used to open/focus the search toggle. Defaults to 'search' icon. | ||
+ clearIcon?: string | ||
+ The icon used to clear the search input. Defaults to 'cancel' icon. | ||
+ showUnderline?: boolean | ||
+ Sets if the input underline should be visible. Defaults to 'false'. | ||
+ debounce?: number | ||
+ Debounce timeout between keypresses. Defaults to 400. | ||
+ alwaysVisible?: boolean | ||
+ Sets if the input should always be visible. Defaults to 'false'. | ||
+ placeholder?: string | ||
+ Placeholder for the underlying input component. | ||
|
||
#### Events | ||
|
||
+ searchDebounce?: string | ||
+ Event emitted after the [debounce] timeout. | ||
+ Emits a [string]. | ||
+ search?: string | ||
+ Event emitted after the key enter has been pressed. | ||
+ Emits a [string]. | ||
+ clear?: string | ||
+ Event emitted after the clear icon has been clicked. | ||
+ Emits [void]. | ||
|
||
## Setup | ||
|
||
Import the [CovalentSearchModule] in your NgModule: | ||
|
||
```typescript | ||
import { CovalentSearchModule } from '@covalent/core/search'; | ||
@NgModule({ | ||
imports: [ | ||
CovalentSearchModule, | ||
... | ||
], | ||
... | ||
}) | ||
export class MyModule {} | ||
``` | ||
|
||
## Usage | ||
|
||
Example for HTML usage: | ||
|
||
```html | ||
<td-search-box backIcon="arrow_back" placeholder="Search here" [(ngModel)]="searchInputTerm" [showUnderline]="false|true" [debounce]="500" [alwaysVisible]="false|true" (searchDebounce)="searchInputTerm = $event" (search)="searchInputTerm = $event" (clear)="searchInputTerm = ''"> | ||
</td-search-box> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# TdSearchInputComponent: td-search-input | ||
|
||
`td-search-input` element to generate a search input with its animated cancel button. | ||
|
||
## API Summary | ||
|
||
#### Inputs | ||
|
||
+ debounce?: number | ||
+ Debounce timeout between keypresses. Defaults to 400. | ||
+ placeholder?: string | ||
+ Placeholder for the underlying input component. | ||
+ showUnderline?: boolean | ||
+ Sets if the input underline should be visible. Defaults to 'false'. | ||
+ clearIcon?: string | ||
+ The icon used to clear the search input. Defaults to 'cancel' icon. | ||
|
||
#### Events | ||
|
||
+ searchDebounce: function | ||
+ Event emitted after the [debounce] timeout. | ||
+ Emits a [string]. | ||
+ search: function | ||
+ Event emitted after the key enter has been pressed. | ||
+ Emits a [string]. | ||
+ clear: function | ||
+ Event emitted after the clear icon has been clicked. | ||
+ Emits [void]. | ||
+ blur: function | ||
+ Event emitted after the blur event has been called in underlying input. | ||
+ Emits [void]. | ||
|
||
#### Methods | ||
+ focus: function | ||
+ Method to focus to underlying input. | ||
+ clearSearch: function | ||
+ Method to clear the underlying input. | ||
|
||
## Setup | ||
|
||
Import the [CovalentSearchModule] in your NgModule: | ||
|
||
```typescript | ||
import { CovalentSearchModule } from '@covalent/core/search'; | ||
@NgModule({ | ||
imports: [ | ||
CovalentSearchModule, | ||
... | ||
], | ||
... | ||
}) | ||
export class MyModule {} | ||
``` | ||
|
||
## Usage | ||
|
||
Example for HTML usage: | ||
|
||
```html | ||
<td-search-input placeholder="Search here" [(ngModel)]="searchInputTerm" [showUnderline]="false|true" [debounce]="500" (searchDebounce)="searchInputTerm = $event" (search)="searchInputTerm = $event" (clear)="searchInputTerm = ''"> | ||
</td-search-input> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters