1.4.1 • Published 7 years ago

sg-react-components v1.4.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

sg-react-components

Build Status JS Standard

React components for SUGOS project.

Installation

$ npm install sg-react-components --save

Demo

Live demo is hosted on GitHub Pages.

Usage

'use strict'

import React from 'react'
import {
  SgThemeStyle
} from 'sg-react-components'

const DOMINANT_COLOR = '#FFC533'

const ExampleComponent = React.createClass({
  render () {
    return (
      <div>
        <SgThemeStyle dominant={ DOMINANT_COLOR }/>
      </div>
    )
  }
})

Components

SgAlbum

Props

NameTypeDefaultDescription
widthnumber300Width(px) of a image.
imageListarray[]List of image src.
thumbnailColnumber4Number of images per 1 row in the thumbnail.
thumbnailSelectedColorstring'yellow'Border color of selected image in the thumbnail.
onChangefuncCalled when update. Argument is index of imageList.

SgBody

Props

NameTypeDefaultDescription

SgButton

Props

NameTypeDefaultDescription

SgHead

Props

NameTypeDefaultDescription

SgHeader

Props

NameTypeDefaultDescription

SgHeart

Props

NameTypeDefaultDescription
widthnumber44
heightnumber44
heartRatenumber60
idstring

SgHtml

Props

NameTypeDefaultDescription

SgKinectFrame

Props

NameTypeDefaultDescription
bodiesarrayBody frame data from kinect
widthnumberdepthSpace.BOUND_WIDTHComponent width
heightnumberdepthSpace.BOUND_HEIGHTComponent height
frameWidthnumber4Width of frames
jointRadiusnumber3Radius of joint
scalenumber2Scale rate of canvas
altstring'NO BODY FOUND'Alt message when no body found
colorizerfunccolorHelper.uniqueColorizer('#CCCC33')Colorizer function

SgMain

Props

NameTypeDefaultDescription

SgMicrophone

Props

NameTypeDefaultDescription
widthnumber44
heightnumber44
onboolfalse

SgPage

Props

NameTypeDefaultDescription

SgSwitch

Props

NameTypeDefaultDescription
widthnumberWidth(px) of a switch.
onboolThe state of on/off.
onTapfuncFunction on tap.
onTitlestring
offTitlestring
highlightColorstring
backgroundColorstring
borderColorstring
handleSizenumber

SgThemeStyle

Props

NameTypeDefaultDescription
styleobject{}
dominantstringApStyle.DEFAULT_HIGHLIGHT_COLOR

SgVideo

Props

NameTypeDefaultDescription
srcstringarrayOfVideo source URL
playerReffuncfunction() {}Register player

License

This software is released under the Apache-2.0 License.

Links