Initial git

This commit is contained in:
Qolzam
2017-07-06 11:20:18 +04:30
commit 7c691d8e4d
142 changed files with 13046 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
// - Import react components
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { grey400 } from 'material-ui/styles/colors'
import SvgClose from 'material-ui/svg-icons/navigation/close'
import FlatButton from 'material-ui/FlatButton'
import Divider from 'material-ui/Divider'
/**
* Create component class
*/
export default class DialogTitle extends Component {
static propTypes = {
/**
* The label of right button
*/
buttonLabel: PropTypes.string,
/**
* If it's true button will be disabled
*/
disabledButton: PropTypes.bool,
/**
* Call the funtion the time is clicked on right button
*/
onClickButton: PropTypes.func,
/**
* The function will be called the time is clicked on close
*/
onRequestClose: PropTypes.func.isRequired,
/**
* The title of dialog box
*/
title: PropTypes.string
}
/**
* Component constructor
* @param {object} props is an object properties of component
*/
constructor(props) {
super(props)
//Defaul state
this.state = {
}
// Binding functions to `this`
}
/**
* Reneder component DOM
* @return {react element} return the DOM which rendered by component
*/
render() {
const styles = {
contain: {
display: 'flex',
flexDirection: 'row',
justifyContent: "space-between"
},
title: {
color: 'rgba(0,0,0,0.87)',
flex: '1 1',
font: '500 20px Roboto,RobotoDraft,Helvetica,Arial,sans-serif'
}
}
const { buttonLabel, disabledButton, onClickButton, onRequestClose, title } = this.props
return (
<div className='g__dialog-title'>
<div style={styles.contain}>
<div style={{ paddingRight: '10px' }}>
<SvgClose onClick={onRequestClose} hoverColor={grey400} style={{ cursor: 'pointer' }} />
</div>
<div style={styles.title}>
{title || ''}
</div>
{ buttonLabel ? (<div style={{ marginTop: '-9px' }}>
<FlatButton label={buttonLabel || ''} primary={true} disabled={disabledButton ? disabledButton : false} onClick={onClickButton || (() => _)} />
</div>) : ''}
</div>
<Divider />
</div>
)
}
}

View File

@@ -0,0 +1,32 @@
// - Import react components
import React, { Component } from 'react'
import IconButton from 'material-ui/IconButton'
import MoreVertIcon from 'material-ui/svg-icons/navigation/more-vert'
import { grey200, grey400, grey600 } from 'material-ui/styles/colors'
/**
* DOM styles
*
*
* @memberof Post
*/
const styles = {
iconButton: {
width: 24,
height: 24
}
}
const IconButtonElement = (
<IconButton style={styles.iconButton} iconStyle={styles.iconButton}
touch={true}
>
<MoreVertIcon color={grey400} viewBox='9 0 24 24' />
</IconButton>
)
export default IconButtonElement

View File