Created
October 23, 2018 07:13
-
-
Save Faliszek/59ca43872be39d33afc463003801bea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let component = ReasonReact.statelessComponent("Icon"); | |
type iconType = | |
| Spotify; | |
let typeOfIcon = (t: iconType) => | |
switch (t) { | |
| Spotify => "fab fa-spotify" | |
}; | |
let make = (~iconType: iconType, _children) => { | |
...component, | |
render: _self => <div> <i className={typeOfIcon(iconType)} /> </div>, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment