Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

mixxorz
Copy link
Owner

@mixxorz mixxorz commented Aug 7, 2022

This PR adds the ability to use data-, aria-, or other HTML attributes that have hyphens on the {% attrs %} tag.

For example:

{# logo component #}
<a {% attrs href aria_label %}><img src="logo.png" /></a>

{# Usage #}
{% logo href="/" aria_label="Slipper's logo" %}

{# Output #}
<a href="/" aria-label="Slipper's logo"><img src="logo.png" /></a>

This fixes #16 .

lolrenx
lolrenx previously approved these changes Aug 8, 2022
@mixxorz mixxorz merged commit da760a8 into main Aug 10, 2022
@mixxorz mixxorz deleted the feature/handle-hyphens branch August 10, 2022 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow {% attrs %} to render hyphenated attributes ( aria-label, data-script etc)

2 participants