mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-17 10:39:09 +00:00
UI: add real proptypes for immutable things
This commit is contained in:
parent
a8196de3c7
commit
6cc827d258
4 changed files with 19 additions and 6 deletions
|
@ -1,11 +1,17 @@
|
|||
import React, { Component } from 'react'
|
||||
import Radium from 'radium'
|
||||
import PropTypes from 'prop-types'
|
||||
import Color from 'color'
|
||||
import './Role.sass'
|
||||
|
||||
const whiteColor = Color('#efefef')
|
||||
|
||||
class Role extends Component {
|
||||
static propTypes = {
|
||||
role: PropTypes.object.isRequired,
|
||||
onToggle: PropTypes.func,
|
||||
type: PropTypes.string
|
||||
}
|
||||
|
||||
render () {
|
||||
const { role } = this.props
|
||||
let color = Color(role.color)
|
||||
|
@ -34,4 +40,4 @@ class Role extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
export default Radium(Role)
|
||||
export default Role
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue