Skip to content

jvalanen/diory-react-components

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diory-react-components

Create Diory React components from Diograph data

Install

Install with npm

$ npm i diory-react-components --save

Import

import { Diory, DioryImage, DioryText } from 'diory-react-components'

Usage

Diograph data

const diory = {
  text: 'Hello, I am a diory. Take me home!',
  image: 'https://gravatar.com/avatar/ff80f8f9bc52f1b79e468a41f2239001',
  styles: {
    diory: { width: '20em', height: '20em', backgroundColor: 'green', margin: '5em auto' },
    text: { fontSize: '2em', fontFamily: 'sans-serif', color: 'white', textAlign: 'center', textShadow: '1px 1px green' },
    image: { opacity: 0.6, filter: 'blur(5px)' }
  }
}

Diory components

<div>
  <DioryImage { ...diory } />
  <DioryText { ...diory } />
  <Diory { ...diory } />
</div>

Diorys

alt text

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](#please create an issue)

Author

Olli-Pekka Pohjola

License

Copyright © 2017 [Olli-Pekka Pohjola](#Olli-Pekka Pohjola) Licensed under the ISC license.


This file was generated by readme-generator on May 11, 2017.

About

Create Diory React components from Diograph data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.9%
  • HTML 2.1%