https://github.com/mciparelli/cyclejs-gravatar
Cycle.js component for rendering a gravatar profile image
https://github.com/mciparelli/cyclejs-gravatar
Last synced: 3 months ago
JSON representation
Cycle.js component for rendering a gravatar profile image
- Host: GitHub
- URL: https://github.com/mciparelli/cyclejs-gravatar
- Owner: mciparelli
- License: mit
- Created: 2016-01-22T23:24:32.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-24T16:05:35.000Z (almost 10 years ago)
- Last Synced: 2025-03-14T16:44:16.826Z (9 months ago)
- Language: JavaScript
- Homepage: https://mciparelli.github.io/cyclejs-gravatar/example/
- Size: 111 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cyclejs - mciparelli/cyclejs-gravatar ★0 - Cycle.js component for rendering a gravatar profile image. (Libraries / Components)
README
# cyclejs-gravatar
> Gravatar component for Cycle.js
## Install
```bash
npm install cyclejs-gravatar --save
```
## [Demo live](http://mciparelli.github.io/cyclejs-gravatar/example/)
## Usage
```javascript
import Cycle from '@cycle/core';
import {div, h1, makeDOMDriver} from '@cycle/dom';
import Gravatar from 'cyclejs-gravatar';
function main({DOM}) {
const gravatarProps$ = Observable.of({
email: 'your@email.com'
});
const gravatar = Gravatar({ props$: gravatarProps$ });
return {
DOM: gravatar.DOM.map(gravatarVTree =>
div([
h1('My Gravatar'),
gravatarVTree
])
)
};
}
Cycle.run(main, {
DOM: makeDOMDriver('.app')
});
```
### Inspirations
- [cyclejs-calendar](https://github.com/enten/cyclejs-calendar)
- [react-gravatar](https://github.com/KyleAMathews/react-gravatar)
## License
MIT