andrewMacmurray / elm-simple-animation

stateless animation utils for Elm
https://package.elm-lang.org/packages/andrewMacmurray/elm-simple-animation/latest/
MIT License
50 stars 3 forks source link

Common format for Animated helpers #5

Closed andrewMacmurray closed 3 years ago

andrewMacmurray commented 3 years ago

I only just thought of this after I published 1.0.0 🤦 but using a record to inject external dependencies (like for elm-ui https://package.elm-lang.org/packages/andrewMacmurray/elm-simple-animation/latest/Simple-Animated#UiOptions) could be a nice, low mental overhead pattern to use for other ones

So Simple.Animated.svg would become:

animatedSvg =
    Simple.Animated.svg
        { class = Svg.Attributes.class
        }