react-organogram
v0.0.0
Published
Made with create-react-library
Downloads
33
Readme
react-organogram
Made with create-react-library
Install
npm install --save react-organogram
Example
Usage
import React from 'react'
import { Organogram } from 'react-organogram'
import 'react-organogram/dist/index.css'
const lists = [
{
title: 'First level',
description: 'Hello world',
image:
'https://www.vhv.rs/dpng/d/256-2569650_men-profile-icon-png-image-free-download-searchpng.png',
children: [
{
title: 'Second level 1',
description: 'Hello world',
children: []
},
{
title: 'Second level 2',
description: 'Hello world',
children: [
{
title: 'Third level 1',
description: 'Hello world',
children: [
{
title: 'Forth level 1',
description: 'Hello world',
children: []
},
{
title: 'Forth level 2',
description: 'Hello world',
children: []
}
]
},
{
title: 'Third level 2',
description: 'Hello world',
children: [
{
title: 'Forth level 3',
description: 'Hello world',
children: []
}
]
}
]
},
{
title: 'Second level 3',
description: 'Hello world',
children: [
{
title: 'Third level 3',
description: 'Hello world',
children: []
}
]
}
]
}
]
const Example = () => {
return (
<Organogram lists={lists}>
<h1 style={{ textAlign: 'center' }}>This is my header</h1>
</Organogram>
)
}
export default Example
License
MIT © pkdadson