proda-ai/elm-svg-loader/1.0.0

NOTE: the latest version is 1.0.1

Rerouted (retagged, verified). The tag now points at a different commit than when this version was published. The Lamdera package server serves a copy recovered from https://github.com/proda-ai/elm-svg-loader.

What we checked: Tag 1.0.0 now points at 684c6587d114, not the published commit. Rebuilt with git archive from commit e140b5da7e3c of https://github.com/proda-ai/elm-svg-loader (zip prefix proda-ai-elm-svg-loader-e140b5d/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 8fb1082d11a88934fb5942d39b6e32fa6b4ff924.

The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.

Details · package.elm-lang.org's zip: https://github.com/proda-ai/elm-svg-loader/zipball/1.0.0/

InlineSvg

This library allows you to inline external SVG file into Elm views.

inline : icons -> Helpers icons msg

This function returns a record, which contains a icon function to reference individual SVG document.

{ icon } =
    inline
        { github = "./svg/github.svg"
        , share = "./svg/share.svg"
        }


view =
    div
        []
        [ icon .github [ Svg.Attributes.class "icon icon--github" ]
        , icon .share [ Svg.Attributes.class "icon icon--share" ]
        ]
type alias Helpers icons msg =
{ icon : (icons -> String) -> List (Attribute msg) -> Html msg }

This is the record returned from inline function. icon function is used to access individual SVG document, you can also pass a list of attributes to the SVG.

icon .share [Svg.Attributes.fill "blue"] : Html msg