File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 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)
1212Expects a string with all ids the u should have.
1313
1414#### # class (optional)
1515Expects a string with all classes the u should have.
1616
17+
1718## Example 1
1819Adding an optional id
1920
2021``` ruby
2122div id: " foo" , class : " bar" do
22- u id: " u-id"
23+ u id: " u-id" do
24+ plain ' Example text'
25+ end
2326end
2427```
2528
2629returns
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
3841div id: " foo" , class : " bar" do
39- u class : " u-class"
42+ u class : " u-class" , text: ' Example text '
4043end
4144```
4245
4346returns
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```
You can’t perform that action at this time.
0 commit comments