This module allows you to create custom themes for your components.
{ colors : Colors
, typography : TypographyOptions
}
elm-antd theme info used to generate custom themes
defaultTheme : Theme
The default antd theme. This record is exposed to allow you to create custom themes without having to create a whole Theme
record from scratch.
import Ant.Css exposing (createThemedStyles)
import Ant.Theme exposing (defaultTheme)
-- ...
view : Html msg
view =
let
myCustomTheme =
{ defaultTheme
| colors = myCustomColors
}
in
div [ createThemedStyles myCustomTheme ]
defaultColors : Colors
The default set of colors in the base Elm Antd theme. You can import this record to make your own custom Colors.
createMonochromaticColors : Color -> Basics.Float -> Colors -> Colors
Utility function to create a set of monochromatic colors based off of a given "main" color. This is what is used under the hood in Elm Antd to create the Colors
record.
This function only updates the primary
, primaryFaded
and primaryStrong
- leaving the danger
and warning
colors untouched.