UNPKG

@talend/react-containers

Version:

Provide connected components aka containers for @talend/react-cmf based on @talend/react-components.

24 lines 836 B
import PropTypes from 'prop-types'; import { List, Map } from 'immutable'; import { cmfConnect } from '@talend/react-cmf'; import { Notification as Component } from "@talend/react-components"; import { jsx as _jsx } from "react/jsx-runtime"; export const DEFAULT_STATE = new Map({ notifications: new List() }); function Notification(props) { const state = (props.state || DEFAULT_STATE).toJS(); return /*#__PURE__*/_jsx(Component, { leaveFn: i => props.deleteNotification(i), notifications: state.notifications, autoLeaveError: props.autoLeaveError }); } Notification.displayName = 'Container(Notification)'; Notification.propTypes = { deleteNotification: PropTypes.func, autoLeaveError: PropTypes.bool, ...cmfConnect.propTypes }; export default Notification; //# sourceMappingURL=Notification.container.js.map