Add doc comments for Manifest.Config builder functions.

This commit is contained in:
Dillon Kearns 2021-04-23 08:54:49 -07:00
parent 20f37a4069
commit 0e6d6612b3
2 changed files with 19 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -93,6 +93,8 @@ type Orientation
| PortraitSecondary
{-| Setup a minimal Manifest.Config. You can then use the `with...` builder functions to set additional options.
-}
init :
{ description : String
, name : String
@ -125,41 +127,57 @@ usEnglish =
}
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/background_color>.
-}
withBackgroundColor : Color -> Config -> Config
withBackgroundColor color config =
{ config | backgroundColor = Just color }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/categories>.
-}
withCategories : List Category -> Config -> Config
withCategories categories config =
{ config | categories = categories ++ config.categories }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/display>.
-}
withDisplayMode : DisplayMode -> Config -> Config
withDisplayMode displayMode config =
{ config | displayMode = displayMode }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/orientation>.
-}
withOrientation : Orientation -> Config -> Config
withOrientation orientation config =
{ config | orientation = orientation }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/iarc_rating_id>.
-}
withIarcRatingId : String -> Config -> Config
withIarcRatingId iarcRatingId config =
{ config | iarcRatingId = Just iarcRatingId }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/theme_color>.
-}
withThemeColor : Color -> Config -> Config
withThemeColor themeColor config =
{ config | themeColor = Just themeColor }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/short_name>.
-}
withShortName : String -> Config -> Config
withShortName shortName config =
{ config | shortName = Just shortName }
{-| Set <https://developer.mozilla.org/en-US/docs/Web/Manifest/lang>.
-}
withLang : LanguageTag -> Config -> Config
withLang languageTag config =
{ config | lang = languageTag }