-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DATAP-1611 Made Chart Error Notification Full-Width (#563)
* Moved chart error notification to outside of the main chart wrapper, so that it can have full-width * Updated margin for error notifications in general, and specialized ones in Trends Panel * update dist --------- Co-authored-by: Chanel Henley <[email protected]> Co-authored-by: Richard Dinh <[email protected]>
- Loading branch information
1 parent
7fd8619
commit ec1235d
Showing
12 changed files
with
78 additions
and
65 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
import './ChartWrapper.scss'; | ||
import { ErrorBlock } from '../../Warnings/Error'; | ||
import PropTypes from 'prop-types'; | ||
|
||
export const ChartWrapper = ({ domId, hasKey, isEmpty }) => ( | ||
export const ChartWrapper = ({ domId, hasKey }) => ( | ||
<section className={`${hasKey ? 'ext-tooltip' : ''}`}> | ||
{isEmpty ? ( | ||
<ErrorBlock text="Cannot display chart. Adjust your date range or date interval." /> | ||
) : ( | ||
<div className="chart-wrapper"> | ||
<p className="y-axis-label">Complaints</p> | ||
<div id={domId} /> | ||
<p className="x-axis-label">Date received by the CFPB</p> | ||
</div> | ||
)} | ||
<div className="chart-wrapper"> | ||
<p className="y-axis-label">Complaints</p> | ||
<div id={domId} /> | ||
<p className="x-axis-label">Date received by the CFPB</p> | ||
</div> | ||
</section> | ||
); | ||
|
||
ChartWrapper.propTypes = { | ||
domId: PropTypes.string.isRequired, | ||
hasKey: PropTypes.bool.isRequired, | ||
isEmpty: PropTypes.bool.isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.error { | ||
&.m-notification { | ||
margin: 10px; | ||
} | ||
} |