mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2025-01-05 05:07:06 +03:00
Add doc comments
This commit is contained in:
parent
c8b186bdda
commit
2fc8d0b2da
@ -1,14 +1,23 @@
|
|||||||
module Nri.Ui.Slide.V1 exposing
|
module Nri.Ui.Slide.V1 exposing
|
||||||
( AnimationDirection(..)
|
( AnimationDirection(..)
|
||||||
, animateIn
|
|
||||||
, animateOut
|
|
||||||
, withSlidingContents
|
, withSlidingContents
|
||||||
|
, animateIn, animateOut
|
||||||
)
|
)
|
||||||
|
|
||||||
|
{-|
|
||||||
|
|
||||||
|
@docs AnimationDirection
|
||||||
|
@docs withSlidingContents
|
||||||
|
@docs animateIn, animateOut
|
||||||
|
|
||||||
|
-}
|
||||||
|
|
||||||
import Css
|
import Css
|
||||||
import Css.Animations
|
import Css.Animations
|
||||||
|
|
||||||
|
|
||||||
|
{-| Slide from right to left or from left to right.
|
||||||
|
-}
|
||||||
type AnimationDirection
|
type AnimationDirection
|
||||||
= FromRTL
|
= FromRTL
|
||||||
| FromLTR
|
| FromLTR
|
||||||
@ -29,6 +38,8 @@ slideTimingFunction =
|
|||||||
Css.property "animation-timing-function" "ease-in-out"
|
Css.property "animation-timing-function" "ease-in-out"
|
||||||
|
|
||||||
|
|
||||||
|
{-| Add this class to the container whose descendents are sliding.
|
||||||
|
-}
|
||||||
withSlidingContents : Css.Style
|
withSlidingContents : Css.Style
|
||||||
withSlidingContents =
|
withSlidingContents =
|
||||||
Css.batch
|
Css.batch
|
||||||
@ -37,6 +48,8 @@ withSlidingContents =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
{-| Add this style to the element you want to animate in.
|
||||||
|
-}
|
||||||
animateIn : AnimationDirection -> Css.Style
|
animateIn : AnimationDirection -> Css.Style
|
||||||
animateIn direction =
|
animateIn direction =
|
||||||
let
|
let
|
||||||
@ -61,6 +74,10 @@ animateIn direction =
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
{-| Add this style to the element you want to animate out.
|
||||||
|
Note: this will absolutely position the element.
|
||||||
|
You must add `withSlidingContents` to one of its ancestors.
|
||||||
|
-}
|
||||||
animateOut : AnimationDirection -> Css.Style
|
animateOut : AnimationDirection -> Css.Style
|
||||||
animateOut direction =
|
animateOut direction =
|
||||||
let
|
let
|
||||||
|
Loading…
Reference in New Issue
Block a user