From 2fc8d0b2da2fbbe7e75fb7d02b9f39b14beb17e2 Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Thu, 11 Apr 2019 12:30:52 -0700 Subject: [PATCH] Add doc comments --- src/Nri/Ui/Slide/V1.elm | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Nri/Ui/Slide/V1.elm b/src/Nri/Ui/Slide/V1.elm index 41d81d08..f28a5c15 100644 --- a/src/Nri/Ui/Slide/V1.elm +++ b/src/Nri/Ui/Slide/V1.elm @@ -1,14 +1,23 @@ module Nri.Ui.Slide.V1 exposing ( AnimationDirection(..) - , animateIn - , animateOut , withSlidingContents + , animateIn, animateOut ) +{-| + +@docs AnimationDirection +@docs withSlidingContents +@docs animateIn, animateOut + +-} + import Css import Css.Animations +{-| Slide from right to left or from left to right. +-} type AnimationDirection = FromRTL | FromLTR @@ -29,6 +38,8 @@ slideTimingFunction = Css.property "animation-timing-function" "ease-in-out" +{-| Add this class to the container whose descendents are sliding. +-} withSlidingContents : Css.Style withSlidingContents = Css.batch @@ -37,6 +48,8 @@ withSlidingContents = ] +{-| Add this style to the element you want to animate in. +-} animateIn : AnimationDirection -> Css.Style animateIn direction = 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 direction = let