primait/pyxis-components - version: 9.0.3

for more information visit the package's GitHub page

Package contains the following modules:

Pyxis UI components written in elm

Prima Design System public package for elm. It helps to build scalable UIs by mantaining consistency between design and components across different apps.

Written in elm@0.19.

By using elm's type system we can predict behaviors of our components and test them, building strong, scalable ecosystem for our design.

Common usage patterns

Do

Don't

Example:

import Prima.Pyxis.Accordion.Accordion as Accordion exposing (Config, State, Accordion)
...

view : Model -> List (Html Msg)

view model = Accordion.render model.accordionState model.accordionConfig

...

Publishing package

Run the following commands after you had committed your work:

$ yarn build:diff
$ yarn build:create
$ TAG_NUMBER=$(cat elm.json | grep "\"version\":" | awk '{print $2}' | sed 's/",//g' | sed 's/"//g')
$ git tag $TAG_NUMBER
$ git push origin $TAG_NUMBER
$ git commit -m "Upgrade version to TAG_NUMBER" && git push // to master or PR branch and after merge
$ yarn build:publish

N.B. After run build:create, follow terminal advices to write documentation and confirm the package update (if needed)

Testing package

Run ./node_modules/.bin/elm reactor command. It will start a local server which points to http://localhost:8000 . Remember to run Pyxis on local webserver in order to see styled form fields. You can now navigate through the examples and test your work before publishing it.

Navigable Documentation

Run ./node_modules/.bin/elm make --docs=docs.jsoncommand, in the main directory of pyxis-component will be generated a docs.json file then open https://elm-doc-preview.netlify.app/ and click to "Open files". You will be able to browse the docs