mirror of
https://github.com/Orasund/elm-ui-widgets.git
synced 2024-11-25 20:51:36 +03:00
50 lines
2.5 KiB
Elm
50 lines
2.5 KiB
Elm
|
module VerifyExamples.Widget.ImageItem0 exposing (..)
|
||
|
|
||
|
-- This file got generated by [elm-verify-examples](https://github.com/stoeffel/elm-verify-examples).
|
||
|
-- Please don't modify this file by hand!
|
||
|
|
||
|
import Test
|
||
|
import Expect
|
||
|
|
||
|
import Widget exposing (..)
|
||
|
import Element.Font as Font
|
||
|
import Widget.Material.Color as MaterialColor
|
||
|
import Widget.Material as Material
|
||
|
import Element
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
spec0 : Test.Test
|
||
|
spec0 =
|
||
|
Test.test "#imageItem: \n\n [ Widget.imageItem (Material.imageItem Material.defaultPalette)\n { onPress = Nothing\n , image =\n Element.image [ Element.width <| Element.px <| 40, Element.height <| Element.px <| 40 ]\n { src = \"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Elm_logo.svg/1024px-Elm_logo.svg.png\"\n , description = \"Elm logo\"\n }\n , text = \"Item with Image\"\n , content =\n \\{ size, color } ->\n \"1.\"\n |> Element.text\n |> Element.el\n [ Font.color <| MaterialColor.fromColor color\n , Font.size size\n ]\n }\n ]\n |> Widget.itemList (Material.cardColumn Material.defaultPalette)\n |> always \"Ignore this line\"\n --> \"Ignore this line\"" <|
|
||
|
\() ->
|
||
|
Expect.equal
|
||
|
(
|
||
|
[ Widget.imageItem (Material.imageItem Material.defaultPalette)
|
||
|
{ onPress = Nothing
|
||
|
, image =
|
||
|
Element.image [ Element.width <| Element.px <| 40, Element.height <| Element.px <| 40 ]
|
||
|
{ src = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f3/Elm_logo.svg/1024px-Elm_logo.svg.png"
|
||
|
, description = "Elm logo"
|
||
|
}
|
||
|
, text = "Item with Image"
|
||
|
, content =
|
||
|
\{ size, color } ->
|
||
|
"1."
|
||
|
|> Element.text
|
||
|
|> Element.el
|
||
|
[ Font.color <| MaterialColor.fromColor color
|
||
|
, Font.size size
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
|> Widget.itemList (Material.cardColumn Material.defaultPalette)
|
||
|
|> always "Ignore this line"
|
||
|
)
|
||
|
(
|
||
|
"Ignore this line"
|
||
|
)
|