import React from 'react'; import { PropTypes } from 'prop-types'; import { Flex, FlexItem, Label, Text, } from '@patternfly/react-core'; import { ExclamationTriangleIcon } from '@patternfly/react-icons'; import { global_warning_color_100 as warningColor, } from '@patternfly/react-tokens'; const ActionSummary = ({ title, text, selectedEnv: { name, id } }) => (
{title &&

{title}

} {text && {text} {name && id && } }
); ActionSummary.propTypes = { title: PropTypes.oneOfType([ PropTypes.string, PropTypes.object, // React component ]), text: PropTypes.oneOfType([ PropTypes.string, PropTypes.object, // React component ]), selectedEnv: PropTypes.shape({ id: PropTypes.number, name: PropTypes.string, }), }; ActionSummary.defaultProps = { title: undefined, text: undefined, selectedEnv: {}, }; export default ActionSummary;