Basic UI elements in place
This commit is contained in:
25
website/src/ui/HeaderButton.js
Normal file
25
website/src/ui/HeaderButton.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import Radium from 'radium'
|
||||
import PropTypes from 'prop-types'
|
||||
import React, { Component } from 'react'
|
||||
import style from './HeaderButton.style'
|
||||
import { Icon } from 'ui'
|
||||
|
||||
class HeaderButton extends Component {
|
||||
static propTypes = {
|
||||
icon: PropTypes.string,
|
||||
onClick: PropTypes.func,
|
||||
size: PropTypes.number
|
||||
}
|
||||
|
||||
render() {
|
||||
const { onClick, icon, size } = this.props
|
||||
|
||||
return (
|
||||
<button type='button' style={[{ height: size, width: size }, style.base]} onClick={onClick}>
|
||||
<Icon name={icon} size={size} />
|
||||
</button>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default Radium(HeaderButton)
|
||||
Reference in New Issue
Block a user