mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-15 20:15:12 -05:00
23 lines
710 B
Elm
Executable file
23 lines
710 B
Elm
Executable file
module Config.Style.Svgs.Helpers exposing (..)
|
|
|
|
import Config.Style.Svgs.Types as SvgTypes exposing (..)
|
|
import Element as E exposing (..)
|
|
import Svg
|
|
|
|
|
|
|
|
{- buildSvg consumes an inner record to construct most of an SVG, and an outer record to supply
|
|
any potentially varying TypedSvg.Core.Attribute msgs and wrap it in an Element.el so it can be
|
|
used by elm-ui. It provides a consistent interface for inserting SVGs into elm-ui code.
|
|
-}
|
|
|
|
|
|
buildSvg : SvgTypes.OuterPart msg -> SvgTypes.InnerPart msg -> Element msg
|
|
buildSvg outer inner =
|
|
el
|
|
outer.elementAttributes
|
|
<|
|
|
html <|
|
|
Svg.svg
|
|
(outer.svgAttributes ++ inner.svgAttributes)
|
|
inner.svg
|