We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal ellie example
Code from the ellie example:
module Main exposing (main) import Browser import Html.Styled exposing (..) import Html.Styled.Lazy exposing (..) import Css exposing (..) import Html.Styled.Attributes exposing (css) strings = [ "A" , "B", "C"] viewString : String -> Html msg viewString str = let strColour = if str == "A" then rgb 166 11 0 else rgb 0 110 29 in option [ css [ color strColour ] ] [ text str ] viewStrings : Html msg viewStrings = strings |> List.map (\txt -> lazy viewString txt ) |> select [ ] view _ = viewStrings |> toUnstyled main : Program () () () main = Browser.sandbox { init = () , view = view , update = \_ _ -> () }
I want to colour the individual options differently.
Without lazy:
With lazy:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Minimal ellie example
Code from the ellie example:
I want to colour the individual options differently.
Without lazy:
![image](https://user-images.githubusercontent.com/3525980/83334092-045ca600-a29c-11ea-88e9-5435e55445a1.png)
With lazy:
The text was updated successfully, but these errors were encountered: