mirror of
https://github.com/maputnik/editor.git
synced 2026-02-16 17:40:01 +00:00
Error panel with current map style errors #40
This commit is contained in:
25
src/components/ErrorPanel.jsx
Normal file
25
src/components/ErrorPanel.jsx
Normal 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
|
||||
Reference in New Issue
Block a user