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

Removal of shared types module #6

Closed
mikeastock opened this issue Feb 24, 2021 · 4 comments
Closed

Removal of shared types module #6

mikeastock opened this issue Feb 24, 2021 · 4 comments

Comments

@mikeastock
Copy link
Contributor

Quick question, in the latest version of this library the shared types have been removed. This caused us to no longer be able to integrate the package with our internal color module as we now need to provide a helper function to convert each type of icon color. Would you consider moving back to a shared type module for colors? Thanks!

Here's an example of what we use to have:

toMaterialIcon : Element.Color -> Coloring
toMaterialIcon color =
    color
        |> toColorLibColor
        |> Material.Icons.Color

-- Convert elm-ui color to avh4/elm-color
toColorLibColor : Element.Color -> Color
toColorLibColor color =
    let
        rgba =
            Element.toRgb color
    in
    Color.rgba rgba.red rgba.green rgba.blue rgba.alpha
@icidasset
Copy link
Owner

Will revert the changes 👍

@mikeastock
Copy link
Contributor Author

Awesome! Thanks for the quick response!

@icidasset
Copy link
Owner

icidasset commented Feb 26, 2021

@mikeastock Made a new release https://package.elm-lang.org/packages/icidasset/elm-material-icons/7.0.0/ with ye olden Types module. Let me know if that works for you.

@mikeastock
Copy link
Contributor Author

Works great! Thank you again!

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

No branches or pull requests

2 participants