import React, { useState } from 'react'; import cn from 'classnames'; const AppInfo = ({ type, children, dismissible }) => { const [dismissed, setDismissed] = useState(false); if (!dismissed) { const handleDismiss = () => { if (dismissible) { setDismissed(true); } }; const className = cn('app-info', { [`app-info-${type}`]: type }); return (
{children}
); } return null; }; export default AppInfo;