UNPKG

@eccenca/gui-elements

Version:

Collection of low-level GUI elements like Buttons, Icons or Alerts. Also includes core styles for those elements.

23 lines (17 loc) 417 B
import React from 'react'; import PropTypes from 'prop-types'; import Alert from './Alert'; const Error = props => { const { children, ...otherProps } = props; return ( <Alert type="error" {...otherProps}> {children} </Alert> ); }; // define property types Error.propTypes = { children: PropTypes.node.isRequired, }; Error.displayName = 'Error'; export default Error;