|
1 | 1 | import React from 'react';
|
2 | 2 | import PropTypes from 'prop-types';
|
3 |
| -import { Badge, Button, Form } from 'react-bootstrap'; |
4 |
| -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; |
5 |
| -import { faTimes } from '@fortawesome/free-solid-svg-icons'; |
| 3 | +import { Badge, Button, Form, CloseButton } from 'react-bootstrap'; |
6 | 4 |
|
7 | 5 | import { getFrameworkName } from '../perf-helpers/helpers';
|
8 | 6 | import { graphColors } from '../perf-helpers/constants';
|
@@ -129,33 +127,27 @@ const LegendCard = ({
|
129 | 127 | }
|
130 | 128 | };
|
131 | 129 |
|
132 |
| - const subtitleStyle = 'p-0 mb-0 border-0 text-secondary text-left'; |
| 130 | + const subtitleStyle = 'p-0 mb-0 border-0 text-secondary text-start'; |
133 | 131 | const symbolType = series.symbol || ['circle', 'outline'];
|
134 | 132 |
|
135 | 133 | const { suite, platform, framework_id: frameworkId } = series;
|
136 | 134 | const framework = getFrameworkName(frameworks, frameworkId);
|
137 | 135 | const perfdocs = new Perfdocs(framework, suite, platform);
|
138 | 136 | const hasDocumentation = perfdocs.hasDocumentation();
|
139 | 137 | return (
|
140 |
| - <Form.Group className="ps-0 border"> |
141 |
| - <Button |
142 |
| - className="close me-3 my-2 ms-2 bg-transparent" |
| 138 | + <Form.Group className="ps-0 border position-relative"> |
| 139 | + <CloseButton |
| 140 | + className="position-absolute top-0 end-0 m-2" |
143 | 141 | onClick={removeTest}
|
144 | 142 | data-testid="remove-test-button"
|
145 |
| - > |
146 |
| - <FontAwesomeIcon |
147 |
| - className="pointer" |
148 |
| - icon={faTimes} |
149 |
| - size="xs" |
150 |
| - title="" |
151 |
| - /> |
152 |
| - </Button> |
| 143 | + aria-label="Remove test" |
| 144 | + /> |
153 | 145 | <div className={`${series.color[0]} graph-legend-card p-3`}>
|
154 | 146 | <Button
|
155 | 147 | variant="outline-link"
|
156 | 148 | className={`p-0 mb-0 pointer border-0 ${
|
157 | 149 | series.visible ? series.color[0] : 'text-muted'
|
158 |
| - } text-left`} |
| 150 | + } text-start`} |
159 | 151 | onClick={() => addTestData('addRelatedConfigs')}
|
160 | 152 | title="Add related configurations"
|
161 | 153 | >
|
@@ -213,7 +205,7 @@ const LegendCard = ({
|
213 | 205 | <div className="small">{`alert_threshold: ${series.alertThreshold}`}</div>
|
214 | 206 | <div className="small">{`${series.signatureHash.slice(0, 16)}...`}</div>
|
215 | 207 | </div>
|
216 |
| - <Form.Control |
| 208 | + <Form.Check |
217 | 209 | className="show-hide-check"
|
218 | 210 | type="checkbox"
|
219 | 211 | checked={series.visible}
|
|
0 commit comments