$ npm install --save evermut
# or
$ yarn add evermut
A working version looks like:
import React from 'react'
import ReactDOM from 'react-dom'
import { Logo } from 'evermut'
ReactDOM.render(
<Logo src={<source_path>} />,
document.getElementById('root')
)
Type: string
Default: Back
Basic structure: Back to somewhere
Type: func
, required
Basic structure: () => {}
Type: bool
Default: false
Basic structure: true
or false
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Basic structure:
{
crumb: `string` or `array`, # required
route: `string` or `object`, # required
}
Basic structure of crumb
if
- string
crumb: `string`, # required
- object
crumb: [
{
name: `string`, # required ,
id: `string` or `number`, # required
},
...
]
Basic structure of route
if
- string
route: `string`, # required
- object
route: {
name: `string`, # required ,
id: `string` or `number`, # required
}
Type: func
, required
Basic structure: () => {}
Type: number
, required
Basic structure: 999
Type: number
, required
Basic structure: 999
Type: string
, required
Basic structure: #525F7F
Type: string
, required
Basic structure: #99a5c2
Type: bool
Default: false
Basic structure: true
or false
Type: object
, required
Basic structure:
{
current: `number`, # required
count: `number`, # required
}
Example:
{
current: 2,
count: 10
}
Type: bool
Default: false
Basic structure: true
or false
Type: object
, required
Basic structure:
{
id: `string` or `number`, # required
title: `string`, # required
description: `string`,
tags: `array`,
actions: `array`, # required
menu: `object of objects 'list' and 'onClick'`
}
Example:
{
id: 1,
title: "Here Is Your Title",
description: "Here Is Your Description",
tags: ['some', 'tags', ...],
actions: [
<StateAction actions={['running']} onClick={this.click} tooltip />,
'waiting',
...
],
menu: {
list: [
{name: 'Something', link: '/some'},
...
],
onClick: () => {}
}
}
Type: array
, required
Basic structure:
[
{
name: 'Name',
icon: 'icon-name', # based on ui-box, not required
props: {
href: '#',
target: '_blanket',
onSelect: () => {}, # not required
...style # style props based on ui-box
}
},
...
]
Type: array
Default: []
Basic structure: Same as primaryMenu
Type: string
Default: #f5f6f7
Basic structure: #f5f6f7
Type: elementType
Default: none
Basic structure:
Type: elementType
Default: none
Basic structure:
Type: array
, required
Basic structure:
[
{
name: 'Sam',
id: '123',
... # anything that is neccessary
},
...
]
Type: number
or string
, required
Basic struncture: 123
Type: bool
Default: false
Basic structure: true
or false
Type: function
Default: none
Basic structure: () => {} # some function that will return a view
Type: function
Default: none
Basic structure: () => {} # some function that will return a view
Type: function
Default: none
Basic structure: () => {} # some function that will return a view
Type: function
Default: none
Basic structure: () => {}
Type: string
Default: Back
Basic structure: Back to somewhere
Type: function
Default: none
Basic structure: () => {}
Type: string
Default: #f5f6f7
Basic structure: #f5f6f7
Type: string
Default: white
Basic structure: white
Type: object
Default: {}
Basic structure: { margin: 10 }
Type: object
Default: {}
Basic structure: { margin: 10 }
Type: object
Default: {}
Basic structure: { margin: 10 }
Type: object
# based on ui-box, not required
Default: {}
Type: string
Default: 100vh
you can add other styles regarding the Loader container other than height
property
Type: string
Default: null
Basic structure: "./logo.svg"
Type: bool
Default: false
Basic structure: true
or false
Type: string
Default: 'Login'
Type: string
Default: ''
Type: func
, required
Basic structure: () => {}
Type: bool
Default: false
Basic structure: true
or false
Type: string
, required
Basic structure: "./logo.svg"
Type: object
Default:
# based on ui-box, not required
{
height: 60,
transform: 'rotate(-45deg) translateX(1px)'
}
Type: bool
Default: false
Basic structure: true
or false
Type: number
, required
Basic structure: 999
Type: number
Default: 10
Basic structure: 999
Type: number
Default: 1
Basic structure: 999
Type: func
, required
Basic structure: () => {}
Type: bool
Default: false
Basic structure: true
or false
Type: bool
Default: false
Basic structure: true
or false
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Basic structure:
[
{
logo: <Component />,
props: {
href: '#',
target: '_blanket',
onSelect: () => {}, # not required
...style # style props based on ui-box
}
},
# or
{
name: 'Name',
icon: 'icon-name', # based on ui-box, not required
props: {
href: '#',
target: '_blanket',
onSelect: () => {}, # not required
...style # style props based on ui-box
}
},
...
]
Type: array
Default: []
Basic structure: Same as primaryMenuSticky
Type: array
, required
Basic structure:
[
{
name: 'Name',
icon: 'icon-name', # based on ui-box, not required
props: {
href: '#',
target: '_blanket',
onSelect: () => {}, # not required
...style # style props based on ui-box
}
},
...
]
Type: array
Default: []
Basic structure: Same as primaryMenuHorizontal
Type: string
Default: #f5f6f7
Basic structure: #f5f6f7
Type: string
Default: #f5f6f7
Basic structure: #f5f6f7
Type: elementType
Default: none
Basic structure:
Type: elementType
Default: none
Basic structure:
Type: object
Basic structure: { margin: 10 }
Type: object
Basic structure: { margin: 10 }
Type: bool
Default: false
Basic structure: true
or false
Type: elementType
, required
Basic structure: () => {} # function that will return a view
Type: func
, required
Basic structure: () => {}
Type: bool
, required
Basic structure: true
or false
Type: object
, required
Default: {}
Basic structure: { margin: 10 }
<br Β />
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Possible values: 'running'
, 'waiting'
, 'warning'
, 'stopped'
Basic structure: ['running']
Type: func
, required
Basic structure: () => {}
Type: bool
Default: false
Basic structure: true
or false
Type: bool
Default: false
Basic structure: true
or false
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Basic structure:
[
{
link: {
name: `string`,
path: `string`
},
component: <Component />,
func: `func`,
},
...
]
Examples:
[
{
link: {
name: 'Sme name',
path: '#name'
},
component: 'Name Component',
func: this.nameFunction
},
...
]
Type: func
, required
Basic structure: () => {}
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Basic structure:
[
{
logo: <Component />,
props: {
href: '#',
target: '_blanket',
onSelect: () => {}, # not required
...style # style props based on ui-box
}
},
# or
{
name: 'Name',
icon: 'icon-name', # based on ui-box, not required
props: {
href: '#',
target: '_blanket',
onSelect: () => {}, # not required
...style # style props based on ui-box
}
},
...
]
Type: array
Default: []
Basic structure: Same as primaryMenu
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Basic structure:
[
{
name: 'Some menu item',
link: '/some-menu-item-link'
}
...
]
Type: bool
Default: false
Basic structure: true
or false
Type: array
Default: []
Example:
[
{name: 'Owner', icon: 'arrow-up', func: (item) => this.sort(item)},
{name: 'Containers', helper: 'min/max'},
{name: 'Id'},
...
]
Type: array
, required
Example:
[
{
"id": itemId,
"visibleId": itemId, # please note that if you need the ID to be visible in the table you need to pass it with different property name, as word 'id' is reserved
"name": "itemName",
...
},
...
]
Type: object
Look at Pagination
component for details
Type: function
, required
Basic structure: () => {}
Type: function
, required
Basic structure: () => {}
Type: number
Default: 300
Type: array
, required
Example:
[
{
id: 1,
title: "Here Is Your Title",
description: "Here Is Your Description",
tags: ['some', 'tags', ...],
actions: [
<StateAction actions={['running']} onClick={this.click} />,
'waiting',
...
],
menu: {
list: [
{name: 'Something', link: '/some'},
...
],
onClick: () => {}
}
},
...
]
Type: bool
Default: false
Basic structure: true
or false
Type: elementType
, required
Type: bool
Default: false
Basic structure: true
or false
Type: array
, required
Basic structure:
[
{
name: 'Component name',
component: <Component />
},
...
]
Type: func
, required
Basic structure: () => {}
Type: bool
Default: false
Basic structure: true
or false
Type: string
Default: #edf0f2
Basic structure: #edf0f2
Type: string
Default: white
Basic structure: white
Type: string
Default: #1070ca
Basic structure: #1070ca
Type: string
Default: Choose file
Basic structure: Any other button name
Type: array
Default: []
Basic structure: [ '.tar', '.jpg' ]
Type: function
, required
Basic structure: () => {}
yarn build
ornpm run build
transpiles the JavaScript files for production usage
Evermut is released under the MIT license.
Copyright Β© 2019 mutable.io