Skip to content

Commit ab5a3ba

Browse files
committed
Add ruby, rt and rb tags
1 parent f9e8504 commit ab5a3ba

File tree

13 files changed

+226
-1
lines changed

13 files changed

+226
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%rp{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Rp
2+
class Rp < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%rt{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Rt
2+
class Rt < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%ruby{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Ruby
2+
class Ruby < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end

docs/components/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can build your [own components](/docs/extend/custom_components.md) as well,
99
- [header](/docs/components/header.md)
1010
- [footer](/docs/components/footer.md)
1111
- [main](/docs/components/main.md)
12-
- [nav](/docs/components/nav,md)
12+
- [nav](/docs/components/nav.md)
1313
- [section](/docs/components/section.md)
1414
- [br](/docs/components/br.md)
1515
- [hr](/docs/components/hr.md)
@@ -32,6 +32,9 @@ You can build your [own components](/docs/extend/custom_components.md) as well,
3232
- [link](/docs/components/link.md)
3333
- [label](/docs/components/label.md)
3434
- [progress](/docs/components/progress.md)
35+
- [ruby](/docs/components/ruby.md)
36+
- [rt](/docs/components/rb.md)
37+
- [rp](/docs/components/rt.md)
3538

3639
## Dynamic Core Components
3740

docs/components/rp.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# matestack core component: Rp
2+
3+
Show [specs](/spec/usage/components/rp_spec.rb)
4+
5+
The HTML rp tag implemented in ruby.
6+
7+
## Parameters
8+
9+
This component can take 2 optional configuration params and optional content.
10+
11+
#### # id (optional)
12+
Expects a string with all ids the main should have.
13+
14+
#### # class (optional)
15+
Expects a string with all classes the main should have.
16+
17+
## Example
18+
19+
```ruby
20+
rp id: "foo", class: "bar" do
21+
plain 'Hello World' # optional content
22+
end
23+
```
24+
25+
returns
26+
27+
```html
28+
<rp id="foo" class="bar">
29+
Hello World
30+
</rp>
31+
```

docs/components/rt.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# matestack core component: Rt
2+
3+
Show [specs](/spec/usage/components/rt_spec.rb)
4+
5+
The HTML rt tag implemented in ruby.
6+
7+
## Parameters
8+
9+
This component can take 2 optional configuration params and optional content.
10+
11+
#### # id (optional)
12+
Expects a string with all ids the main should have.
13+
14+
#### # class (optional)
15+
Expects a string with all classes the main should have.
16+
17+
## Example
18+
19+
```ruby
20+
rt id: "foo", class: "bar" do
21+
plain 'Hello World' # optional content
22+
end
23+
```
24+
25+
returns
26+
27+
```html
28+
<rt id="foo" class="bar">
29+
Hello World
30+
</rt>
31+
```

docs/components/ruby.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# matestack core component: Ruby
2+
3+
Show [specs](/spec/usage/components/ruby_spec.rb)
4+
5+
The HTML ruby tag implemented in ruby.
6+
7+
## Parameters
8+
9+
This component can take 2 optional configuration params and optional content.
10+
11+
#### # id (optional)
12+
Expects a string with all ids the main should have.
13+
14+
#### # class (optional)
15+
Expects a string with all classes the main should have.
16+
17+
## Example
18+
19+
```ruby
20+
ruby id: "foo", class: "bar" do
21+
plain 'Hello World' # optional content
22+
end
23+
```
24+
25+
returns
26+
27+
```html
28+
<ruby id="foo" class="bar">
29+
Hello World
30+
</ruby>
31+
```

0 commit comments

Comments
 (0)