feathericons / elm-feather

Feather icons for elm
http://package.elm-lang.org/packages/1602/elm-feather/latest
BSD 3-Clause "New" or "Revised" License
77 stars 4 forks source link

Change default size of all icons? #16

Closed bekicot closed 4 years ago

bekicot commented 5 years ago

Can we change the default size of all icons?

For example:

FeatherIcons.hash
                    |> FeatherIcons.withSize 18

and set the default size to 18, we don't need the:

FeatherIcons.withSize 18

If it is already there, please close this issue. I'm new to elm and have a lot of things to learn, I probably missed it

1602 commented 5 years ago

All functions in elm are pure, so it is not possible have a side effect you want by setting a global variable. In javascript would be possible to have the API you are talking about, but not in elm.

If you want all icons to be the same size, create a function which will be calling FeatherIcons.withSize 18.