Skip to content

Commit 82cace1

Browse files
Fix minor things in <u> documentation
1 parent 92fff91 commit 82cace1

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

docs/components/u.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
1-
# matestack core component: Hr
1+
# matestack core component: U
22

3-
Show [specs](/spec/usage/components/hr_spec.rb)
3+
Show [specs](/spec/usage/components/u_spec.rb)
44

5-
The HTML `<u>` tag implemented in ruby.
5+
The HTML `<u>` tag implemented in Ruby.
66

77
## Parameters
88

9-
This component can take 2 optional configuration params.
9+
This component can take 2 optional configuration params and either yield content or display what gets passed to the `text` configuration param.
1010

1111
#### # id (optional)
1212
Expects a string with all ids the u should have.
1313

1414
#### # class (optional)
1515
Expects a string with all classes the u should have.
1616

17+
1718
## Example 1
1819
Adding an optional id
1920

2021
```ruby
2122
div id: "foo", class: "bar" do
22-
u id: "u-id"
23+
u id: "u-id" do
24+
plain 'Example text'
25+
end
2326
end
2427
```
2528

2629
returns
2730

2831
```html
2932
<div id="foo" class="bar">
30-
<u id="u-id">
33+
<u id="u-id">Example text</u>
3134
</div>
3235
```
3336

@@ -36,14 +39,14 @@ Adding an optional class
3639

3740
```ruby
3841
div id: "foo", class: "bar" do
39-
u class: "u-class"
42+
u class: "u-class", text: 'Example text'
4043
end
4144
```
4245

4346
returns
4447

4548
```html
4649
<div id="foo" class="bar">
47-
<u class="u-class">
50+
<u class="u-class">Example text</u>
4851
</div>
4952
```

0 commit comments

Comments
 (0)