Skip to content

Commit

Permalink
Folded copyable source
Browse files Browse the repository at this point in the history
  • Loading branch information
hojberg committed Jan 8, 2025
1 parent 288136e commit efbba70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/Code/Definition/Doc.elm
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ viewFolded attrs isFolded_ =
]

IsFolded { toggleFoldMsg, content, foldId, isFolded } ->
div (classList [ ( "folded", True ), ( "is-folded", isFolded ) ] :: attrs)
[ FoldToggle.foldToggle (toggleFoldMsg foldId) |> FoldToggle.isOpen (not isFolded) |> FoldToggle.view
, div [ class "folded-content" ] content
div [ class "copyable-source" ]
[ div (classList [ ( "folded", True ), ( "is-folded", isFolded ) ] :: attrs)
[ FoldToggle.foldToggle (toggleFoldMsg foldId) |> FoldToggle.isOpen (not isFolded) |> FoldToggle.view
, div [ class "folded-content" ] content
]
]


Expand Down
1 change: 0 additions & 1 deletion src/css/code/definition-doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@
margin-bottom: 1rem;
display: flex;
flex-direction: row;
position: relative;
}

.definition-doc .folded .folded-content {
Expand Down

0 comments on commit efbba70

Please sign in to comment.