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 object config support to iconPack option #201

Closed
wants to merge 4 commits into from

Conversation

BobbieGoede
Copy link

This allows us to set iconPack to an object like so:

iconPack: {
    classes: ['material-icons-round'],
    textContent: true,
}

In this example config this sets the icon element classes to material-icons-round and uses the icon or icon name as the textContent { icon: 'info' } or { icon: { name: 'info' } } would both set the icon textContent to info.

This change makes it possible to use material icon variations but should also be useful for other iconPack implementation.

Change createIcon to check if iconPack option is a string
@BobbieGoede
Copy link
Author

This PR would resolve my issue #200

@BobbieGoede
Copy link
Author

Replacing this PR with #205

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.

1 participant