problems: font size for alert list layout

This commit is contained in:
Alexander Zobnin
2019-01-16 11:32:15 +03:00
parent 249b3b43d4
commit a61f219dfc
2 changed files with 55 additions and 1 deletions

View File

@@ -58,11 +58,14 @@ export default class AlertList extends PureComponent<AlertListProps, AlertListSt
render() {
const { problems, panelOptions } = this.props;
const currentProblems = this.getCurrentProblems(this.state.page);
let fontSize = parseInt(panelOptions.fontSize.slice(0, panelOptions.fontSize.length - 1), 10);
fontSize = fontSize && fontSize !== 100 ? fontSize : null;
const alertListClass = classNames('alert-rule-list', { [`font-size--${fontSize}`]: fontSize });
return (
<div className="triggers-panel-container" key="alertListContainer">
<section className="card-section card-list-layout-list">
<ol className="alert-rule-list">
<ol className={alertListClass}>
{currentProblems.map(problem =>
<AlertCard
key={problem.triggerid}