Skip to content

Commit

Permalink
docs: 2.3.0 features
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesboris committed May 27, 2021
1 parent 3c9d55e commit 475150b
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions src/UIBook.elm
Original file line number Diff line number Diff line change
Expand Up @@ -254,31 +254,31 @@ customBook config =
}


{-| Customize your book's background color.
{-| Customize your book's background color. Any valid CSS `background` value can be used.
-}
withThemeBackground : String -> UIBookBuilder state html -> UIBookBuilder state html
withThemeBackground themeBackground_ (UIBookBuilder config) =
UIBookBuilder
{ config | themeBackground = themeBackground_ }


{-| Customize your book's background color.
{-| Customize your book's background alt color. Any valid CSS `background` value can be used.
-}
withThemeBackgroundAlt : String -> UIBookBuilder state html -> UIBookBuilder state html
withThemeBackgroundAlt themeBackgroundAlt_ (UIBookBuilder config) =
UIBookBuilder
{ config | themeBackgroundAlt = themeBackgroundAlt_ }


{-| Customize your book's accent color.
{-| Customize your book's accent color. Any valid CSS `color` value can be used.
-}
withThemeAccent : String -> UIBookBuilder state html -> UIBookBuilder state html
withThemeAccent themeAccent_ (UIBookBuilder config) =
UIBookBuilder
{ config | themeAccent = themeAccent_ }


{-| Customize your book's accent auxialiry color.
{-| Customize your book's accent alt color. Any valid CSS `color` value can be used.
-}
withThemeAccentAlt : String -> UIBookBuilder state html -> UIBookBuilder state html
withThemeAccentAlt themeAccentAlt_ (UIBookBuilder config) =
Expand Down Expand Up @@ -309,19 +309,31 @@ themeBackground =
UIBook.UI.Helpers.themeBackground


{-| -}
{-| Use your theme background alt color on other parts of your book.
-}
themeBackgroundAlt : String
themeBackgroundAlt =
UIBook.UI.Helpers.themeBackgroundAlt


{-| -}
{-| Use your theme accent color on other parts of your book.
chapter : UIChapter x
chapter
|> withSection
(p
[ style "color" themeAccent ]
[ text "Hello." ]
)
-}
themeAccent : String
themeAccent =
UIBook.UI.Helpers.themeAccent


{-| -}
{-| Use your theme accent alt color on other parts of your book.
-}
themeAccentAlt : String
themeAccentAlt =
UIBook.UI.Helpers.themeAccentAlt
Expand Down Expand Up @@ -390,6 +402,21 @@ withChapters chapters =

{-| List the chapters, divided by groups, that should be displayed on your book.
book "MyApp"
|> withChapterGroups
[ ( "Guides"
, [ gettingStartedChapter
, sendingRequestsChapter
]
)
, ( "UI Widgets"
, [ buttonsChapter
, formsChapter
, ...
]
)
]
**Should be used as the final step on your setup.**
-}
Expand Down

0 comments on commit 475150b

Please sign in to comment.