primait/pyxis-components/6.0.0

NOTE: the latest version is 9.0.3

Prima.Pyxis.Link

Allows to create a Link using predefined Html syntax.

Configuration

type Config

Represents the configuration of a Link.

type Icon

Represents an icon from Pyxis Iconset.

Configuration Helpers

simple : String -> String -> Config

Creates a simple link. Used when the link itself is in a paragraph.

--


import Prima.Pyxis.Link as Link


...


myLink : Link.Config
myLink =
    Link.simple "Visit site" "https://www.prima.it"
standalone : String -> String -> Config

Creates a standalone link. Used when the link itself stands alone.

--


import Prima.Pyxis.Link as Link


...


myLink : Link.Config
myLink =
    Link.standalone "Visit site" "https://www.prima.it"
withIcon : String -> String -> Icon -> Config

Creates a simple link which holds an icon. Used when the link itself stands alone.

--


import Prima.Pyxis.Link as Link


...


myLink : Link.Config
myLink =
    Link.withIcon "Visit site" "https://www.prima.it" Link.iconEdit

Icons Configuratiion Helpers

Creates a chevron-down icon.

Creates a download icon.

Creates an edit icon.

Creates an email icon.

Creates a phone icon.

Rendering

render : Config -> Html msg

Renders a link by receiving it's configuration.