Fix input element styling madness

This commit is contained in:
John Lyon-Smith
2018-03-04 14:03:42 -08:00
parent 3ef0a3bdc9
commit eaf26343b8
16 changed files with 265 additions and 225 deletions

View File

@@ -1,9 +1,8 @@
import Radium from 'radium'
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import style from './PanelButton.style'
import { Icon } from '.'
import { sizeInfo, fontInfo } from 'ui/style'
import { sizeInfo, fontInfo, colorInfo } from 'ui/style'
class PanelButton extends Component {
static propTypes = {
@@ -12,13 +11,34 @@ class PanelButton extends Component {
text: PropTypes.string.isRequired,
}
static style = {
button: {
borderWidth: 2,
borderRadius: '10px',
padding: '0 0 0 0',
background: colorInfo.panelButtonBackground,
verticalAlign: 'middle',
outline: 'none',
':hover': {
background: colorInfo.panelButtonBackgroundHover,
},
':disabled': {
background: colorInfo.disabledPanelButtonBackground,
},
':active': {
borderWidth: 0,
background: colorInfo.panelButtonBackgroundActive,
}
}
}
render() {
const { onClick, icon, text } = this.props
return (
<button type='button'
style={[
style.button, { height: sizeInfo.panelButtonSize, width: sizeInfo.panelButtonSize }
PanelButton.style.button, { height: sizeInfo.panelButtonSize, width: sizeInfo.panelButtonSize }
]}
onClick={onClick}>
<div style={{ position: 'relative' }}>