Skip to content

Commit 4d7ff18

Browse files
Fix minor things in <dfn> documentation, add <u> & <dfn> to docs/components README
1 parent 3adc626 commit 4d7ff18

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/components/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ You can build your [own components](/docs/extend/README.md) as well, both static
2121
- [cite](/docs/components/cite.md)
2222
- [code](/docs/components/code.md)
2323
- [data](/docs/components/data.md)
24+
- [dfn](/docs/components/dfn.md)
2425
- [dl](/docs/components/dl.md)
2526
- dd
2627
- dt
@@ -76,6 +77,7 @@ You can build your [own components](/docs/extend/README.md) as well, both static
7677
- th
7778
- tr
7879
- td
80+
- [u](/docs/components/u.md)
7981
- [var](/docs/components/var.md)
8082
- [video](/docs/components/video.md)
8183
- [youtube](/docs/components/youtube.md)

docs/components/dfn.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# matestack core component: Hr
1+
# matestack core component: Dfn
22

33
Show [specs](/spec/usage/components/dfn_spec.rb)
44

55
The HTML `<dfn>` 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 dfn should have.
@@ -19,15 +19,17 @@ Adding an optional id
1919

2020
```ruby
2121
div id: "foo", class: "bar" do
22-
dfn id: "dfn-id"
22+
dfn id: "dfn-id" do
23+
plain 'Example'
24+
end
2325
end
2426
```
2527

2628
returns
2729

2830
```html
2931
<div id="foo" class="bar">
30-
<dfn id="dfn-id">
32+
<dfn id="dfn-id">Example</dfn>
3133
</div>
3234
```
3335

@@ -36,14 +38,14 @@ Adding an optional class
3638

3739
```ruby
3840
div id: "foo", class: "bar" do
39-
dfn class: "dfn-class"
41+
dfn class: "dfn-class", text: 'Example'
4042
end
4143
```
4244

4345
returns
4446

4547
```html
4648
<div id="foo" class="bar">
47-
<dfn class="dfn-class">
49+
<dfn class="dfn-class">Example</dfn>
4850
</div>
4951
```

0 commit comments

Comments
 (0)