elm-mdl/examples/Demo/Badges.elm

29 lines
1.2 KiB
Elm
Raw Normal View History

2016-03-17 21:30:49 +00:00
module Demo.Badges where
import Html exposing (..)
import Html.Attributes exposing (class, style, key)
import Material.Badge as Badge
import Material.Style exposing (..)
2016-03-24 20:15:14 +00:00
import Material.Icon as Icon
-- VIEW
2016-03-17 21:30:49 +00:00
view : List Html
view = [ div [][p [][]
, styled span [Badge.withBadge "2"] [ ] [ text "Span with badge" ]
, p [][]
, styled span [Badge.withBadge "22", Badge.noBackground] [ ] [ text "Span with no background badge" ]
, p [][]
, styled span [Badge.withBadge "33", Badge.overlap] [ ] [ text "Span with badge overlap" ]
, p [][]
, styled span [Badge.withBadge "99", Badge.overlap, Badge.noBackground] [ ] [ text "Span with badge overlap and no background" ]
, p [][]
, styled span [Badge.withBadge ""] [ ] [ text "Span with HTML symbol - Black heart suit" ]
, p [][]
, styled span [Badge.withBadge ""] [ ] [ text "Span with HTML symbol - Rightwards arrow" ]
, p [][]
, styled span [Badge.withBadge "Δ"] [ ] [ text "Span with HTML symbol - Delta" ]
, p [][]
2016-03-24 20:15:14 +00:00
, span [][text "Icon with badge"]
, Icon.view "face" [Icon.size24, Badge.withBadge "33", Badge.overlap ] []
]
]