Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional attributes to icon extension #27

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Jul 13, 2020

Now not only the class can be set of the icon also accessibility attributes e.g.:

{{ get_icon('test', { role: 'none' }) }}
<span class="icon icon-test" role="none"></span>

Also the service registration of the icon twig extension has been simplified by using and will default font implementation:

services:
    Sulu\Twig\Extensions\IconExtension: ~

@alexander-schranz alexander-schranz marked this pull request as ready for review July 13, 2020 13:45
@alexander-schranz alexander-schranz changed the title Add default configuration for icon extension Add additional attributes to icon extension Jul 13, 2020
@alexander-schranz alexander-schranz force-pushed the enhancement/simplify-icon-extension-usage branch 2 times, most recently from 2be7e6a to e38aba5 Compare July 13, 2020 16:45
@alexander-schranz alexander-schranz force-pushed the enhancement/simplify-icon-extension-usage branch from e38aba5 to 4f55c07 Compare July 13, 2020 16:54
src/IconExtension.php Show resolved Hide resolved
src/IconExtension.php Show resolved Hide resolved
@niklasnatter niklasnatter merged commit d3892b2 into sulu:master Jul 14, 2020
@alexander-schranz alexander-schranz deleted the enhancement/simplify-icon-extension-usage branch July 14, 2020 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants