Skip to content

Commit

Permalink
Moving/adjusting styles to FlintAlerts.
Browse files Browse the repository at this point in the history
  • Loading branch information
erinesullivan committed Aug 23, 2023
1 parent 306daf9 commit 3e49928
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
13 changes: 10 additions & 3 deletions src/modules/flint/components/FlintAlerts/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @jsxImportSource @emotion/react */
import React, { useState } from 'react';
import { Alert } from '../../../reusable';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';

Expand All @@ -26,15 +26,22 @@ function FlintAlerts (props) {
};

return (
<Alert type='warning'>
<div
className='alert alert--warning alert-inner'
css={{
gap: '1rem',
justifyContent: 'center',
marginTop: '-0.75rem'
}}
>
<span dangerouslySetInnerHTML={{ __html: alertMessages[props.datastore] }} />
<button
className='btn btn--small btn--secondary'
onClick={onClose}
>
Dismiss
</button>
</Alert>
</div>
);
};

Expand Down
15 changes: 1 addition & 14 deletions src/modules/pages/components/DatastorePage/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,7 @@ class DatastorePageContainer extends React.Component {
<>
<SearchBox />
<DatastoreNavigation />
<div
css={{
marginTop: '-0.75rem',
'.alert-inner': {
display: 'flex',
justifyContent: 'center'
},
':empty': {
display: 'none'
}
}}
>
<FlintAlerts />
</div>
<FlintAlerts />
<ConnectedSwitch>
<Route
path={match.url + '/record/:recordUid/get-this/:barcode'}
Expand Down

0 comments on commit 3e49928

Please sign in to comment.