2020-04-01 02:00:29 +03:00
|
|
|
module Examples.Text.Writing exposing (example, State, Msg)
|
2018-03-01 01:04:22 +03:00
|
|
|
|
2020-03-24 03:48:53 +03:00
|
|
|
{-|
|
|
|
|
|
2020-04-01 02:00:29 +03:00
|
|
|
@docs example, State, Msg
|
2020-03-24 03:48:53 +03:00
|
|
|
|
2018-03-01 01:04:22 +03:00
|
|
|
-}
|
|
|
|
|
2020-03-24 03:33:42 +03:00
|
|
|
import Category exposing (Category(..))
|
2020-03-31 23:33:05 +03:00
|
|
|
import Example exposing (Example)
|
2018-10-23 19:55:30 +03:00
|
|
|
import Html.Styled exposing (text)
|
2020-06-20 00:45:32 +03:00
|
|
|
import KeyboardSupport exposing (Direction(..), Key(..))
|
2018-03-02 00:34:44 +03:00
|
|
|
import Nri.Ui.Text.Writing.V1 as TextWriting
|
2018-03-01 01:04:22 +03:00
|
|
|
|
|
|
|
|
|
|
|
{-| -}
|
2020-04-01 02:00:29 +03:00
|
|
|
type alias State =
|
|
|
|
()
|
|
|
|
|
|
|
|
|
|
|
|
{-| -}
|
|
|
|
type alias Msg =
|
|
|
|
()
|
|
|
|
|
|
|
|
|
|
|
|
example : Example State Msg
|
2018-03-01 01:04:22 +03:00
|
|
|
example =
|
2020-09-09 21:43:10 +03:00
|
|
|
{ name = "Text.Writing"
|
|
|
|
, version = 1
|
2020-06-19 23:41:28 +03:00
|
|
|
, categories = [ Text ]
|
2020-06-20 00:45:32 +03:00
|
|
|
, keyboardSupport = []
|
2020-03-31 23:33:05 +03:00
|
|
|
, state = ()
|
|
|
|
, update = \_ state -> ( state, Cmd.none )
|
|
|
|
, subscriptions = \_ -> Sub.none
|
2021-11-06 00:06:32 +03:00
|
|
|
, preview = [ TextWriting.footnote [ text "This is a footnote. " ] ]
|
2020-03-31 23:33:05 +03:00
|
|
|
, view =
|
|
|
|
\_ ->
|
|
|
|
let
|
|
|
|
longerBody =
|
|
|
|
"""Be on the lookout for a new and improved assignment
|
2018-03-01 01:04:22 +03:00
|
|
|
creation form! Soon, you'll be able to easily see a summary
|
|
|
|
of the content you're assigning, as well as an estimate for
|
|
|
|
how long the assignment will take.
|
|
|
|
"""
|
2020-03-31 23:33:05 +03:00
|
|
|
in
|
|
|
|
[ TextWriting.footnote [ text <| "This is a footnote. " ++ longerBody ]
|
|
|
|
]
|
2018-03-01 01:04:22 +03:00
|
|
|
}
|