diff options
Diffstat (limited to 'website/sandbox/chord-drill-sergeant/src/ChordInspector.elm')
-rw-r--r-- | website/sandbox/chord-drill-sergeant/src/ChordInspector.elm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/website/sandbox/chord-drill-sergeant/src/ChordInspector.elm b/website/sandbox/chord-drill-sergeant/src/ChordInspector.elm new file mode 100644 index 000000000000..809894f2c2b0 --- /dev/null +++ b/website/sandbox/chord-drill-sergeant/src/ChordInspector.elm @@ -0,0 +1,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 + ) + ] + ) + ) |