billstclair/elm-cards-view/1.0.4

NOTE: the latest version is 1.2.0

CardsView

Turn a playing card into an Svg instance.

Convert a Card to Svg

This is likely all that you'll use from this module.

cardToSvg : Card -> Int -> CardDescription msg

Convert a Card and a height into Svg.

Types

type alias Size =
{ width : Int
, height : Int
}

Width and height.

type alias CardDescription msg =
{ card : Card
, size : Size
, svg : Svg msg
}

Information about one card.

type alias CardTextDescription =
{ card : Card
, size : Size
, svg : String
}

Low-level information about a card.

Utilities

cardToString : Card -> String

Turn a Card into a string.

stringToCard : String -> Result String Card

Parse a String into a Card.

suitToString : Suit -> String

Turn a Suit into a string.