Skip to content

Commit

Permalink
FE: UI tweak for the "copy to clipboard" display.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kris Jenkins authored and krisajenkins committed Aug 3, 2020
1 parent df4ed01 commit 719c7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions web-common/src/Bootstrap.purs
Expand Up @@ -319,6 +319,9 @@ floatRight = ClassName "float-right"
displayFlex :: ClassName
displayFlex = ClassName "d-flex"

alignItemsCenter :: ClassName
alignItemsCenter = ClassName "align-items-center"

clearfix :: ClassName
clearfix = ClassName "clearfix"

Expand Down
4 changes: 2 additions & 2 deletions web-common/src/Clipboard.purs
Expand Up @@ -7,7 +7,7 @@ module Clipboard
, showShortCopyLong
) where

import Bootstrap (btn, btnLink, displayFlex, textTruncate)
import Bootstrap (btn, btnLink, displayFlex, textTruncate, alignItemsCenter)
import Control.Monad (class Monad)
import Control.Monad.Reader.Trans (ReaderT)
import Control.Monad.State.Trans (StateT)
Expand Down Expand Up @@ -71,7 +71,7 @@ clipboardButton str =

showShortCopyLong :: forall p. String -> Maybe (Array (HTML p Action)) -> HTML p Action
showShortCopyLong str content =
div [ class_ displayFlex ]
div [ classes [ displayFlex, alignItemsCenter ] ]
[ div [ classes [ textTruncate ] ]
(fromMaybe [ text str ] content)
, clipboardButton str
Expand Down

0 comments on commit 719c7ef

Please sign in to comment.