Skip to content

Commit 337b28d

Browse files
committed
Required changes for del
1 parent 5895efc commit 337b28d

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

app/concepts/matestack/ui/core/del/del.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%del{@tag_attributes}
1+
%del{@tag_attributes.merge({:cite => options[:cite], :datetime => options[:datetime]})}
22
- if options[:text].nil? && block_given?
33
= yield
44
- else

docs/components/del.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ The HTML del tag implemented in ruby.
99
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)
12-
Expects a string with all ids the span should have.
12+
Expects a string with all ids the del should have.
1313

1414
#### # class (optional)
15-
Expects a string with all classes the span should have.
15+
Expects a string with all classes the del should have.
16+
17+
#### # cite (optional)
18+
Expects a string with a URL to a document that explains the reason why the text was deleted.
19+
20+
#### # datetime (optional)
21+
Expects a string which specifies the date and time of when the text was deleted.
1622

1723
## Example 1: Yield a given block
1824

spec/usage/components/del_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def response
2828
static_output = page.html
2929

3030
expected_static_output = <<~HTML
31-
<del>I am simple</del>
31+
<del cite='' datetime=''>I am simple</del>
3232
<del id="my-id" class="my-class">I am enhanced</del>
3333
HTML
3434

@@ -56,7 +56,7 @@ def response
5656
static_output = page.html
5757

5858
expected_static_output = <<~HTML
59-
<del>I am simple</del>
59+
<del cite='' datetime=''>I am simple</del>
6060
<del id="my-id" class="my-class">I am enhanced</del>
6161
HTML
6262

0 commit comments

Comments
 (0)