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

Update Awesome/AwesomePro, make enums CaseIterable and add withKey fu… #67

Closed
wants to merge 2 commits into from

Conversation

klousy92
Copy link

Adding CaseIterable to enums allows us to call them dynamicly with rawValue

Awesome.Regular(rawValue: "\u{f007}")?.image
AwesomePro.Regular(rawValue: "\u{f640}")?.image

Additionally by adding the static withKey function to the enums, we can call icons by the key value as a string

Awesome.Regular.withKey("user")?.image
AwesomePro.Regular.withKey("bell")?.image

@daemedeor
Copy link

daemedeor commented Sep 21, 2022

I'd like to point out this is an auto-generated file that you're modifying. So any changes you're making to the file will fail the next time they auto generate the file

@klousy92
Copy link
Author

You are definetly right, didn't update the generator logic.
Your PR #69 is worth to be reviewd.

@klousy92 klousy92 closed this Oct 21, 2022
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.

3 participants