Skip to content

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