Giter VIP home page Giter VIP logo

purescript-react-material-ui's Introduction

purescript-react-material-ui

Wrappers to use Material UI components with purescript-react.

Supported material-ui version: v1.0.0-beta - for 0.18.7 see 0.1.0 release.

Wrappers auto-generated from prop/flow-types using react-docgen via purescript-react-wrapper-gen.

Usage

Each component is contained in its own module, e.g. MaterialUI.Button, and exposes an element factory, e.g. button, taking an options object for props and children array.

  Button.button (
    Button.raised := true
 <> Button.dense := true
  ) [
      D.text "Clicky button"
    ]
  ]

See test example.

Documentation

API documentation is available on Pursuit.

purescript-react-material-ui's People

Contributors

bartadv avatar nwolverson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

purescript-react-material-ui's Issues

How to handle `onChange` event for input

in MaterialUI.Input the type of onChange is

onChange :: Option InputOption (UnknownType)

but it seems like you would want to use

onChange :: Option InputOption (EventHandlerOpt)

if this is intentional, can you please explain how I can convert the following piece of code using purescript-react to material ui?

addressInput :: ReactElement
addressInput = 
    D.input [ P._type "text"
            , P.placeholder "0xdeadbeef"
            , P.onChange \e -> dispatch (UpdateAddress (unsafeCoerce e).target.value)
            ] []

Add an onClick event handler example

Could you show how to add an onClick event handler on the button in test/Main.purs ?
(I read the discussion on issue #3 but that didn't help me). Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.