Error panel with current map style errors #40

This commit is contained in:
Lukas Martinelli
2016-12-30 13:21:03 +01:00
parent 886c87f231
commit 89d497c73f
5 changed files with 54 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
import React from 'react'
import Paragraph from './Paragraph'
import colors from '../config/colors'
import { fontSizes, margins } from '../config/scales'
class ErrorPanel extends React.Component {
static propTypes = {
messages: React.PropTypes.array,
}
render() {
return <div style={{
padding: margins[1],
}}>
{this.props.messages.map(m => <Paragraph style={{
color: colors.red,
margin: 0,
lineHeight: 1.2,
}}>{m}</Paragraph>)}
</div>
}
}
export default ErrorPanel