Giter Site home page Giter Site logo

thebaronalex / evermut Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mutable/evermut

0.0 1.0 0.0 6.79 MB

Extensions and Views to ๐ŸŒฒ Evergreen React UI Framework by Segment https://evergreen.segment.com/

JavaScript 99.98% HTML 0.02%

evermut's Introduction

Evermut

Mutable with ๐ŸŒฒ Evergreen React UI Framework by Segment

Install and use components

$ 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')
)


Components

BreadCrumbs

loading

Type: bool

Default: false

Basic structure: true or false

crumbs

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 
  }
onClick

Type: func, required

Basic structure: () => {}


CircularProgressBar

size

Type: number, required

Basic structure: 999

strokeWidth

Type: number, required

Basic structure: 999

strokeColor

Type: string, required

Basic structure: #525F7F

secondaryStrokeColor

Type: string, required

Basic structure: #99a5c2

percentage

Type: bool

Default: false

Basic structure: true or false

step

Type: object, required

Basic structure:

{
  current: `number`, # required
  count: `number`, # required
}

Example:

{
  current: 2,
  count: 10
}

ExtendedMenuItem

loading

Type: bool

Default: false

Basic structure: true or false

details

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: () => {}
  }
}


Loader

style

Type: object # based on ui-box, not required Default: {}

height

Type: string Default: 100vh


Login

logoBackground

Type: string Default: #f7f8fa

logo

Type: string

Default: null

Basic structure: "./logo.svg"

rounded

Type: bool

Default: false

Basic structure: true or false

buttonName

Type: string

Default: 'Login'

title

Type: string

Default: ''

login

Type: func, required

Basic structure: () => {}


Logo

loading

Type: bool

Default: false

Basic structure: true or false

src

Type: string, required

Basic structure: "./logo.svg"

style

Type: object

Default:

# based on ui-box, not required
{
  height: 60,
  transform: 'rotate(-45deg) translateX(1px)'
}

Pagination

loading

Type: bool

Default: false

Basic structure: true or false

count

Type: number, required

Basic structure: 999

limit

Type: number

Default: 10

Basic structure: 999

pageIndex

Type: number

Default: 1

Basic structure: 999

onClick

Type: func, required

Basic structure: () => {}


StateAction

loading

Type: bool

Default: false

Basic structure: true or false

actions

Type: array, required

Possible values: 'running', 'waiting', 'warning', 'stopped'

Basic structure: ['running']

onClick

Type: func, required

Basic structure: () => {}

tooltip

Type: bool

Default: false

Basic structure: true or false


Stepper

loading

Type: bool

Default: false

Basic structure: true or false

show

Type: bool

Default: false

Basic structure: true or false

steps

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
  },
  ...
]

func

Type: func, required

Basic structure: () => {}


StickyMenu

loading

Type: bool

Default: false

Basic structure: true or false

primaryMenu

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
    }
  },
  ...
]
secondaryMenu

Type: array

Default: []

Basic structure: Same as primaryMenu

stickBottom

Type: bool

Default: false

Basic structure: true or false


TabContentView # Coming Soon

tabs

Type: array, required

Basic structure:

[
  {
    name: 'Some menu item',
    link: '/some-menu-item-link'
  }
  ...
]

Table

loading

Type: bool

Default: false

Basic structure: true or false

headerNames

Type: array

Default: []

Example:

[
  {name: 'Owner', icon: 'arrow-up', func: (item) => this.sort(item)},
  {name: 'Containers', helper: 'min/max'},
  {name: 'Id'},
  ...
]
list

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",
    ...
  },
  ...
]
pagination

Type: object

Look at Pagination component for details

search

Type: function, required

Basic structure: () => {}

onClick

Type: function, required

Basic structure: () => {}

TableWithSingle

basis

Type: number

Default: 300

rows

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: () => {}
    }
  },
  ...
]
loading

Type: bool

Default: false

Basic structure: true or false

listItem

Type: elementType, required

singleComponent # Coming soon

ToggleMenu

loading

Type: bool

Default: false

Basic structure: true or false

menuList

Type: array, required

Basic structure:

[
  {
    name: 'Component name',
    component: <Component />
  },
  ...
]
onClick

Type: func, required

Basic structure: () => {}


Development

  • yarn build or npm run build transpiles the JavaScript files for production usage

License

Evermut is released under the MIT license.

Copyright ยฉ 2019 mutable.io

evermut's People

Contributors

annanarim avatar lusineterpetrosyan avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.