import React from 'react'; import './InfoDetails.css'; import Box from '../UI/Box/Box'; import Button from '../UI/Button/Button'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { dismissInfo, notifyError } from '../../redux/actions/error_actions'; import { promptLocationAndSaveFile } from '../../utils'; const InfoDetails = (props) => { let msg = props.InfoMessage.message; const classes = ['InfoDetailsContent']; let changed = true; let copyable = false; while (changed) { changed = false; if (msg.startsWith('!alternate!')) { classes.push('Alternate'); msg = msg.substr('!alternate!'.length); changed = true; } if (msg.startsWith('!copyable!')) { classes.push('Copyable'); msg = msg.substr('!copyable!'.length); copyable = changed = true; } } const scrollToTop = (textArea) => { if (!textArea.firstClick) { textArea.firstClick = true; textArea.scrollTop = 0; textArea.setSelectionRange(0, 0); } }; return (

{props.InfoMessage.title}

{copyable ? (