Skip to content

Commit

Permalink
update param name
Browse files Browse the repository at this point in the history
  • Loading branch information
precious-onyenaucheya-ons committed Aug 12, 2024
1 parent 2f6fc25 commit 147c0c2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/message/_macro-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
| sentId | string | false | The HTML `id` of the `sentValue` element |
| sentName | string | false | The HTML `name` attribute of the `sentValue` element |
| unreadLinkText | string | false | Text for the the “Mark unread” link element |
| unreadLink | string | false | The URL for the “Mark unread” link element’s `href` attribute |
| unreadLinkUrl | string | false | The URL for the “Mark unread” link element’s `href` attribute |
| unreadLinkId | string | false | The HTML `id` of the “Mark unread” link element |
| messageID | string | false | The HTML `id` of the message body |
4 changes: 2 additions & 2 deletions src/components/message/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</dd>
</div>
</dl>
{% if params.unreadLink %}
{% if params.unreadLinkUrl %}
<a
class="ons-message__unread-link"
{% if params.unreadLinkId %}id="{{ params.unreadLinkId }}"{% endif %}
href="{{ params.unreadLink }}"
href="{{ params.unreadLinkUrl }}"
>{{ params.unreadLinkText }}</a
>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions src/components/message/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const EXAMPLE_MESSAGE_MINIMAL = {

const EXAMPLE_MESSAGE = {
...EXAMPLE_MESSAGE_MINIMAL,
unreadLink: 'https://example.com/message/1',
unreadLinkUrl: 'https://example.com/message/1',
unreadLinkText: 'Unread message',
id: 'message1',
fromId: 'from1',
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('macro: message', () => {
expect($('.ons-message__timestamp .ons-message__value').attr('id')).toBe('sent1');
});

it('has the provided `unreadLink`', () => {
it('has the provided `unreadLinkUrl`', () => {
const $ = cheerio.load(renderComponent('message', EXAMPLE_MESSAGE, ['Message content...']));

expect($('.ons-message__unread-link').attr('href')).toBe('https://example.com/message/1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"fromValue": 'Jackie Turner',
"sentLabel": 'Sent',
"sentValue": 'Today at 13:45',
"unreadLink": '#0',
"unreadLinkUrl": '#0',
"unreadLinkText": 'Mark unread'
})
%}
Expand Down

0 comments on commit 147c0c2

Please sign in to comment.