| Copyright | (C) 2016-2026 David M. Johnson |
|---|---|
| License | BSD3-style (see the file LICENSE) |
| Maintainer | David M. Johnson <code@dmj.io> |
| Stability | experimental |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Miso.Native.X.Element.Svg
Contents
Description
Synopsis
- svgWith_ :: [Attribute model action] -> View context props model action -> View context props model action
- module Miso.Native.X.Element.Svg.Event
- module Miso.Native.X.Element.Svg.Property
Element
Arguments
| :: [Attribute model action] | |
| -> View context props model action | Inline SVG content, in the component's own |
| -> View context props model action |
An <svg> whose inline content is rendered against the enclosing
component's context, props and model, so the content may itself use
vcontext / vprops / vmodel. The
values are obtained ambiently with withContext /
withProps / withModel and passed to content_:
svgWith_ [style_[width"100px" ] ] $ Svg.svg_ [ textProp "xmlns" "http://www.w3.org/2000/svg" ] [vmodel$ \Model { color } -> Svg.circle_ [ Svg.fill_ color ] [] ]
Compare content_, which takes the context, props and model to render
against as explicit arguments.
Since: 1.14.0.0