about summary refs log tree commit diff
path: root/website/sandbox/chord-drill-sergeant/src/ChordInspector.elm
blob: 809894f2c2b04e4d72b5021e0f2e0b12e28897cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
module ChordInspector exposing (render)

import Html exposing (..)
import Theory


render : Theory.Chord -> Html a
render chord =
    case Theory.notesForChord chord of
        Nothing ->
            p [] [ text "Cannot retrieve the notes for the chord." ]

        Just notes ->
            ul []
                (notes
                    |> List.map
                        (\note ->
                            li []
                                [ text
                                    (Theory.viewNote
                                        note
                                    )
                                ]
                        )
                )