mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
24 lines
710 B
Elm
24 lines
710 B
Elm
![]() |
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
|