Skip to content

Commit ffc6977

Browse files
rename pg component to paragraph component
1 parent a5870aa commit ffc6977

File tree

8 files changed

+16
-16
lines changed

8 files changed

+16
-16
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Paragraph::Cell
2+
class Paragraph < Component::Cell::Static
3+
4+
end
5+
end

app/concepts/pg/cell/pg.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/components/pg.md renamed to docs/components/paragraph.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# matestack core component: Pg
1+
# matestack core component: Paragraph
22

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

55
The HTML `<p>` tag implemented in ruby. This is a workaround because the single `p` is the short version of `puts` in ruby.
66

@@ -22,7 +22,7 @@ Specifying the text directly
2222

2323
```ruby
2424
div id: "foo", class: "bar" do
25-
pg text: "Hello World"
25+
paragraph text: "Hello World"
2626
end
2727
```
2828

@@ -39,7 +39,7 @@ Rendering a content block between the `<p>` tags
3939

4040
```ruby
4141
div id: "foo", class: "bar" do
42-
pg do
42+
paragraph do
4343
plain "Hello World"
4444
end
4545
end
@@ -57,7 +57,7 @@ returns
5757
Rendering a `<span>` tag into `<p>` tags
5858

5959
```ruby
60-
pg id: "foo", class: "bar" do
60+
paragraph id: "foo", class: "bar" do
6161
span do
6262
plain "Hello World"
6363
end

spec/usage/components/action_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ class Pages::ExampleApp::SecondExamplePage < Page::Cell::Page
534534
def response
535535
components {
536536
heading size: 2, text: "This is Page 2"
537-
pg text: 'You made it!'
537+
paragraph text: 'You made it!'
538538
}
539539
end
540540

spec/usage/components/footer_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def response
1616

1717
# advanced footer tag
1818
footer id: 'my-unique-footer', class: 'awesome-footer' do
19-
pg class: 'footer-text', text: 'hello world!'
19+
paragraph class: 'footer-text', text: 'hello world!'
2020
end
2121
}
2222
end

spec/usage/components/pg_spec.rb renamed to spec/usage/components/paragraph_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ class ExamplePage < Page::Cell::Page
1010
def response
1111
components {
1212
# simple paragraph
13-
pg text: 'I am simple'
13+
paragraph text: 'I am simple'
1414

1515
# enhanced paragraph
16-
pg id: 'my-id', class: 'my-class' do
16+
paragraph id: 'my-id', class: 'my-class' do
1717
plain 'I am enhanced'
1818
end
1919
}

spec/usage/components/time_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ class ExamplePage < Page::Cell::Page
1010
def response
1111
components {
1212
# simple time tag
13-
pg do
13+
paragraph do
1414
plain 'This should show '
1515
time class: 'my-simple-time' do
1616
plain '12:00'
1717
end
1818
end
1919

2020
# time tag with timestamp
21-
pg id: 'my-parent-paragraph' do
21+
paragraph id: 'my-parent-paragraph' do
2222
plain 'Today is '
2323
time id: 'example-timestamp', datetime: DateTime.new(2019,2,12,10,38,39,'+02:00') do
2424
plain 'July 7'

0 commit comments

Comments
 (0)