File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ You can build your [own components](/docs/extend/README.md) as well, both static
21
21
- [ cite] ( /docs/components/cite.md )
22
22
- [ code] ( /docs/components/code.md )
23
23
- [ data] ( /docs/components/data.md )
24
+ - [ dfn] ( /docs/components/dfn.md )
24
25
- [ dl] ( /docs/components/dl.md )
25
26
- dd
26
27
- dt
@@ -76,6 +77,7 @@ You can build your [own components](/docs/extend/README.md) as well, both static
76
77
- th
77
78
- tr
78
79
- td
80
+ - [ u] ( /docs/components/u.md )
79
81
- [ var] ( /docs/components/var.md )
80
82
- [ video] ( /docs/components/video.md )
81
83
- [ youtube] ( /docs/components/youtube.md )
Original file line number Diff line number Diff line change 1
- # matestack core component: Hr
1
+ # matestack core component: Dfn
2
2
3
3
Show [ specs] ( /spec/usage/components/dfn_spec.rb )
4
4
5
5
The HTML ` <dfn> ` tag implemented in ruby.
6
6
7
7
## Parameters
8
8
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 .
10
10
11
11
#### # id (optional)
12
12
Expects a string with all ids the dfn should have.
@@ -19,15 +19,17 @@ Adding an optional id
19
19
20
20
``` ruby
21
21
div id: " foo" , class : " bar" do
22
- dfn id: " dfn-id"
22
+ dfn id: " dfn-id" do
23
+ plain ' Example'
24
+ end
23
25
end
24
26
```
25
27
26
28
returns
27
29
28
30
``` html
29
31
<div id =" foo" class =" bar" >
30
- <dfn id =" dfn-id" >
32
+ <dfn id =" dfn-id" >Example</ dfn >
31
33
</div >
32
34
```
33
35
@@ -36,14 +38,14 @@ Adding an optional class
36
38
37
39
``` ruby
38
40
div id: " foo" , class : " bar" do
39
- dfn class : " dfn-class"
41
+ dfn class : " dfn-class" , text: ' Example '
40
42
end
41
43
```
42
44
43
45
returns
44
46
45
47
``` html
46
48
<div id =" foo" class =" bar" >
47
- <dfn class =" dfn-class" >
49
+ <dfn class =" dfn-class" >Example</ dfn >
48
50
</div >
49
51
```
You can’t perform that action at this time.
0 commit comments