GithubHelp home page GithubHelp logo

astrada / reason-react-toolbox Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 0.0 131 KB

Reason bindings for react-toolbox

License: MIT License

JavaScript 0.03% OCaml 99.97%
reasonml react-toolbox reason-react bucklescript-bindings

reason-react-toolbox's People

Contributors

astrada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

reason-react-toolbox's Issues

Card component not rendered correctly

Hi,

First of all, great work on the Reason bindings for react-toolbox. I have just started to learn Reason/Reason-react and just found your bindings for react-toolbox, which I have previously used a lot with ReactJS.

I have been playing around with the themeable example . I added the Card-component, but experienced some problems with the component compared to the React Toolbox Card component.
I added the following

<ReactToolboxBundled.Card>
  <ReactToolboxBundled.CardTitle title = (ReasonReact.stringToElement "Card title")/>
</ReactToolboxBundled.Card>

which is outputted as

<div data-react-toolbox="card" class="theme--card--8pay8nO5">
  <div data-react-toolbox="card" class="theme--card--8pay8nO5" title="title"></div>
</div>

If you look at the markup here, the output is:

<div data-react-toolbox="card" class="theme__card___I-1a7" >
  <div class="theme__cardTitle___WES7X theme__small___JPDNt">..</div>
</div>

The markup is clearly different in reason-react-toolbox. Do you know why is might be? If you need anymore information, please let me know. Thanks.

Syntax for icon css attribute?

I was trying to port this app-bar example and cant seem to figure out how to call all the attributes:

      <Link href='http://' label='Inbox' icon='inbox' />
      <Link href='http://' active label='Profile' icon='person' />

Full example is:

import Navigation from 'react-toolbox/lib/navigation';
import Link from 'react-toolbox/lib/Link';

const GithubIcon = () => (
  <svg viewBox="0 0 284 277">
    <g><path d="M141.888675,0.0234927555 C63.5359948,0.0234927555 0,63.5477395 0,141.912168 C0,204.6023 40.6554239,257.788232 97.0321356,276.549924 C104.12328,277.86336 106.726656,273.471926 106.726656,269.724287 C106.726656,266.340838 106.595077,255.16371 106.533987,243.307542 C67.0604204,251.890693 58.7310279,226.56652 58.7310279,226.56652 C52.2766299,210.166193 42.9768456,205.805304 42.9768456,205.805304 C30.1032937,196.998939 43.9472374,197.17986 43.9472374,197.17986 C58.1953153,198.180797 65.6976425,211.801527 65.6976425,211.801527 C78.35268,233.493192 98.8906827,227.222064 106.987463,223.596605 C108.260955,214.426049 111.938106,208.166669 115.995895,204.623447 C84.4804813,201.035582 51.3508808,188.869264 51.3508808,134.501475 C51.3508808,119.01045 56.8936274,106.353063 65.9701981,96.4165325 C64.4969882,92.842765 59.6403297,78.411417 67.3447241,58.8673023 C67.3447241,58.8673023 79.2596322,55.0538738 106.374213,73.4114319 C117.692318,70.2676443 129.83044,68.6910512 141.888675,68.63701 C153.94691,68.6910512 166.09443,70.2676443 177.433682,73.4114319 C204.515368,55.0538738 216.413829,58.8673023 216.413829,58.8673023 C224.13702,78.411417 219.278012,92.842765 217.804802,96.4165325 C226.902519,106.353063 232.407672,119.01045 232.407672,134.501475 C232.407672,188.998493 199.214632,200.997988 167.619331,204.510665 C172.708602,208.913848 177.243363,217.54869 177.243363,230.786433 C177.243363,249.771339 177.078889,265.050898 177.078889,269.724287 C177.078889,273.500121 179.632923,277.92445 186.825101,276.531127 C243.171268,257.748288 283.775,204.581154 283.775,141.912168 C283.775,63.5477395 220.248404,0.0234927555 141.888675,0.0234927555" /></g>
  </svg>
);

const AppBarTest = () => (
  <AppBar title='React Toolbox' leftIcon='menu' rightIcon={<GithubIcon />}>
    <Navigation type='horizontal'>
      <Link href='http://' label='Inbox' icon='inbox' />
      <Link href='http://' active label='Profile' icon='person' />
    </Navigation>
  </AppBar>
);

I've tried passing the classname to icon= like so:

let make = _children => {
  ...component,
  render: _self => {
    let logo = <Logo />;
    let github = <Github />;
    let inbox = ReasonReact.stringToElement("material-icons &#xF686");
    <ReactToolbox.AppBar title="App example" leftIcon=logo rightIcon=github>
      <ReactToolbox.Navigation _type=Horizontal>
        <ReactToolbox.Link href="http://" label="Inbox" icon=inbox />
        <ReactToolbox.Link href="http://" label="Profile" />
      </ReactToolbox.Navigation>
    </ReactToolbox.AppBar>;
  }
};

Any pointers you can share? Thank you.

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.