Skip to content

Commit

Permalink
Add classList to Svg.Attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
globaljake committed Apr 10, 2018
1 parent 8d8ef66 commit 5159251
Showing 1 changed file with 31 additions and 22 deletions.
53 changes: 31 additions & 22 deletions src/Svg/Attributes.elm
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ module Svg.Attributes exposing
( accentHeight, accelerate, accumulate, additive, alphabetic, allowReorder
, amplitude, arabicForm, ascent, attributeName, attributeType, autoReverse
, azimuth, baseFrequency, baseProfile, bbox, begin, bias, by, calcMode
, capHeight, class, clipPathUnits, contentScriptType, contentStyleType, cx, cy
, d, decelerate, descent, diffuseConstant, divisor, dur, dx, dy, edgeMode
, elevation, end, exponent, externalResourcesRequired, filterRes, filterUnits
, format, from, fx, fy, g1, g2, glyphName, glyphRef, gradientTransform
, gradientUnits, hanging, height, horizAdvX, horizOriginX, horizOriginY, id
, ideographic, in_, in2, intercept, k, k1, k2, k3, k4, kernelMatrix
, kernelUnitLength, keyPoints, keySplines, keyTimes, lang, lengthAdjust
, limitingConeAngle, local, markerHeight, markerUnits, markerWidth
, maskContentUnits, maskUnits, mathematical, max, media, method, min, mode
, name, numOctaves, offset, operator, order, orient, orientation, origin
, overlinePosition, overlineThickness, panose1, path, pathLength
, capHeight, class, classList, clipPathUnits, contentScriptType
, contentStyleType, cx, cy , d, decelerate, descent, diffuseConstant, divisor
, dur, dx, dy, edgeMode , elevation, end, exponent, externalResourcesRequired
, filterRes, filterUnits, format, from, fx, fy, g1, g2, glyphName, glyphRef
, gradientTransform, gradientUnits, hanging, height, horizAdvX, horizOriginX
, horizOriginY, id, ideographic, in_, in2, intercept, k, k1, k2, k3, k4
, kernelMatrix, kernelUnitLength, keyPoints, keySplines, keyTimes, lang
, lengthAdjust, limitingConeAngle, local, markerHeight, markerUnits
, markerWidth, maskContentUnits, maskUnits, mathematical, max, media, method
, min, mode, name, numOctaves, offset, operator, order, orient, orientation
, origin, overlinePosition, overlineThickness, panose1, path, pathLength
, patternContentUnits, patternTransform, patternUnits, pointOrder, points
, pointsAtX, pointsAtY, pointsAtZ, preserveAlpha, preserveAspectRatio
, primitiveUnits, r, radius, refX, refY, renderingIntent, repeatCount
Expand Down Expand Up @@ -48,17 +48,17 @@ module Svg.Attributes exposing
@docs accentHeight, accelerate, accumulate, additive, alphabetic, allowReorder,
amplitude, arabicForm, ascent, attributeName, attributeType, autoReverse,
azimuth, baseFrequency, baseProfile, bbox, begin, bias, by, calcMode,
capHeight, class, clipPathUnits, contentScriptType, contentStyleType, cx, cy,
d, decelerate, descent, diffuseConstant, divisor, dur, dx, dy, edgeMode,
elevation, end, exponent, externalResourcesRequired, filterRes, filterUnits,
format, from, fx, fy, g1, g2, glyphName, glyphRef, gradientTransform,
gradientUnits, hanging, height, horizAdvX, horizOriginX, horizOriginY, id,
ideographic, in_, in2, intercept, k, k1, k2, k3, k4, kernelMatrix,
kernelUnitLength, keyPoints, keySplines, keyTimes, lang, lengthAdjust,
limitingConeAngle, local, markerHeight, markerUnits, markerWidth,
maskContentUnits, maskUnits, mathematical, max, media, method, min, mode,
name, numOctaves, offset, operator, order, orient, orientation, origin,
overlinePosition, overlineThickness, panose1, path, pathLength,
capHeight, class, classList, clipPathUnits, contentScriptType
contentStyleType, cx, cy , d, decelerate, descent, diffuseConstant, divisor,
dur, dx, dy, edgeMode , elevation, end, exponent, externalResourcesRequired,
filterRes, filterUnits, format, from, fx, fy, g1, g2, glyphName, glyphRef,
gradientTransform, gradientUnits, hanging, height, horizAdvX, horizOriginX,
horizOriginY, id, ideographic, in_, in2, intercept, k, k1, k2, k3, k4,
kernelMatrix, kernelUnitLength, keyPoints, keySplines, keyTimes, lang,
lengthAdjust, limitingConeAngle, local, markerHeight, markerUnits,
markerWidth, maskContentUnits, maskUnits, mathematical, max, media, method,
min, mode, name, numOctaves, offset, operator, order, orient, orientation,
origin, overlinePosition, overlineThickness, panose1, path, pathLength,
patternContentUnits, patternTransform, patternUnits, pointOrder, points,
pointsAtX, pointsAtY, pointsAtZ, preserveAlpha, preserveAspectRatio,
primitiveUnits, r, radius, refX, refY, renderingIntent, repeatCount,
Expand Down Expand Up @@ -230,6 +230,15 @@ class : String -> Attribute msg
class =
Elm.Kernel.Svg.attribute "class"

{-|-}
classList : List ( String, Bool ) -> Attribute msg
classList list =
list
|> List.filter Tuple.second
|> List.map Tuple.first
|> String.join " "
|> class


{-|-}
clipPathUnits : String -> Attribute msg
Expand Down

0 comments on commit 5159251

Please sign in to comment.