mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: refactored some stuff
This commit is contained in:
parent
5e25267fbe
commit
ed73a38cbe
6 changed files with 380 additions and 141 deletions
45
frontend/src/Config/ToolTip.elm
Normal file
45
frontend/src/Config/ToolTip.elm
Normal file
|
@ -0,0 +1,45 @@
|
|||
module Config.ToolTip exposing (..)
|
||||
|
||||
import Config.Colour exposing (..)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B
|
||||
import Element.Border as D exposing (..)
|
||||
import Element.Font as F
|
||||
import Html exposing (col)
|
||||
import Html.Attributes as H exposing (style)
|
||||
|
||||
|
||||
tooltip : String -> Attribute msg
|
||||
tooltip content =
|
||||
inFront <|
|
||||
el
|
||||
[ E.width fill
|
||||
, height fill
|
||||
, transparent True
|
||||
, mouseOver [ transparent False ]
|
||||
, htmlAttribute <| H.style "z-index" "4"
|
||||
, htmlAttribute <| style "transition" "all 0.3s ease-in-out"
|
||||
, below <|
|
||||
el [ htmlAttribute (H.style "pointerEvents" "none") ] <|
|
||||
el
|
||||
[ E.width <| px 300
|
||||
, htmlAttribute <| H.style "z-index" "4"
|
||||
, F.size 15
|
||||
, F.center
|
||||
, F.regular
|
||||
, B.color colourTheme.backgroundColour
|
||||
, F.color colourTheme.nonHighlightedText
|
||||
, padding 15
|
||||
, D.color colourTheme.highlightText
|
||||
, D.rounded 5
|
||||
, D.width 2
|
||||
, D.shadow
|
||||
{ offset = ( 0, 3 )
|
||||
, blur = 6
|
||||
, size = 0
|
||||
, color = rgba 0 0 0 0.32
|
||||
}
|
||||
]
|
||||
(text content)
|
||||
]
|
||||
none
|
Loading…
Add table
Add a link
Reference in a new issue