Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 1a2906a

Browse files
author
SamGraber
committed
Documented stringWithWatermark
1 parent 7ad8cbf commit 1a2906a

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Angular components that can be added to an application.
5050
* [ratingBar]()
5151
* [signaturePad]()
5252
* [simpleCardList]()
53-
* [stringWithWatermark]()
53+
* [stringWithWatermark](/source/components/stringWithWatermark/stringWithWatermark.md)
5454
* [tabs]()
5555
* [templateRenderer]()
5656
* [userRating]()

bootstrapper/misc/misc.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3>Misc</h3>
7171
</div>
7272

7373
<div class="form-group">
74-
<div><label>String with watermark:</label></div>
74+
<div><label><a href="https://github.com/SamGraber/TypeScript-Angular-Components/blob/master/source/components/stringWithWatermark/stringWithWatermark.md"></a> String with watermark:</label></div>
7575
<rl-textbox ng-model="misc.text"></rl-textbox>
7676
<rl-string-with-watermark string="{{misc.text}}" watermark="(empty)"></rl-string-with-watermark>
7777
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# String with Watermark
2+
Component for showing a placeholder if the specified string has no value.
3+
4+
### Usage
5+
```
6+
<rl-string-with-watermark string="" watermark=""> ... </rl-string-with-watermark>
7+
```
8+
### Options
9+
10+
#### `string`
11+
12+
The value that should be displayed.
13+
14+
#### `watermark`
15+
16+
The placeholder that should be shown in place of the string if none is present.
17+
18+
### Full example
19+
20+
A string with a value:
21+
```
22+
<rl-string-with-watermark string="Something here" watermark="Placeholder"></rl-string-with-watermark>
23+
```
24+
Output:
25+
```
26+
<span>Something here</span>
27+
```
28+
An empty string:
29+
```
30+
<rl-string-with-watermark string="" watermark="Placeholder"></rl-string-with-watermark>
31+
```
32+
Output:
33+
```
34+
<span class="watermark">Placeholder</span>
35+
```

0 commit comments

Comments
 (0)