Skip to content

Commit

Permalink
Fix: Toolkit component text padding (#1461)
Browse files Browse the repository at this point in the history
* polish toolkit message

* justify text

* refactor styles to styles file
  • Loading branch information
Onokaev authored Feb 17, 2022
1 parent 7c9645b commit 965a636
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/app/views/query-response/graph-toolkit/GraphToolkit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';

import {
getTheme,
IStyle,
ITheme,
Label,
MessageBar,
MessageBarType,
Expand All @@ -20,6 +23,9 @@ class GraphToolkit extends Component<any> {
super(props);
}

currentTheme: ITheme = getTheme();
textStyle = queryResponseStyles(this.currentTheme).toolkitText.root as IStyle

public render() {
const { sampleQuery } = this.props;
const { toolkitUrl, exampleUrl } = lookupToolkitUrl(sampleQuery);
Expand All @@ -45,7 +51,7 @@ class GraphToolkit extends Component<any> {
}

return (
<Label className={classes.emptyStateLabel}>
<Label styles={{root: this.textStyle}}>
<FormattedMessage id='We did not find a Graph toolkit for this query' />
&nbsp;
<a
Expand All @@ -58,6 +64,7 @@ class GraphToolkit extends Component<any> {
<FormattedMessage id='Learn more about the Microsoft Graph Toolkit' />
.
</a>

</Label>
);
}
Expand Down
12 changes: 12 additions & 0 deletions src/app/views/query-response/queryResponse.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ export const queryResponseStyles = (theme: ITheme) => {
copyIcon: {
float: 'right',
zIndex: 1
},
toolkitText: {
root: {
padding: '20px',
width: '100%',
margin: 'auto',
display: 'inline-block',
position: 'relative',
top: '160px',
lineHeight: '1.5',
textAlign: 'justify'
}
}
};
};

0 comments on commit 965a636

Please sign in to comment.