Skip to content

Commit

Permalink
fix: Monospacing errors in dashboards & charts (#18796)
Browse files Browse the repository at this point in the history
* fix: Monospacing errors in dashboards & charts

* removed unnecessary styling
  • Loading branch information
codemaster08240328 committed Feb 25, 2022
1 parent 0db49b1 commit 4923256
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion superset-frontend/src/chart/Chart.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ const RefreshOverlayWrapper = styled.div`
justify-content: center;
`;

const MonospaceDiv = styled.div`
font-family: ${({ theme }) => theme.typography.families.monospace};
white-space: pre;
word-break: break-word;
overflow-x: auto;
white-space: pre-wrap;
`;

class Chart extends React.PureComponent {
constructor(props) {
super(props);
Expand Down Expand Up @@ -224,7 +232,7 @@ class Chart extends React.PureComponent {
key={chartId}
chartId={chartId}
error={error}
subtitle={message}
subtitle={<MonospaceDiv>{message}</MonospaceDiv>}
copyText={message}
link={queryResponse ? queryResponse.link : null}
source={dashboardId ? 'dashboard' : 'explore'}
Expand Down

0 comments on commit 4923256

Please sign in to comment.