Skip to content

Commit cc4150d

Browse files
Merge pull request #149 from NordicSemiconductor/style/readback-warning
style: change readback protection warning styling
2 parents 4c3abd6 + e579caf commit cc4150d

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

src/Chart/Chart.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,13 @@ export default () => {
8484
<div className="d-flex flex-column h-100">
8585
{device && noData && readbackProtection === 'protected' && (
8686
<Alert variant="warning">
87-
<div className="d-flex align-items-center">
87+
<div className="d-flex align-items-center flex-wrap readback-protection-warning">
8888
No data received. Unable to verify compatible firmware
8989
because the selected device has readback protection
9090
enabled.
9191
<Button
9292
onClick={() => dispatch(recoverHex(device))}
93-
variant="secondary"
94-
className="alert-program"
93+
variant="custom"
9594
>
9695
Program compatible firmware
9796
</Button>

src/Chart/alert.scss

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,30 @@
44
* SPDX-License-Identifier: LicenseRef-Nordic-4-Clause
55
*/
66

7+
@use 'sass:color';
78
@import '~pc-nrfconnect-shared/styles';
89

9-
.alert-program {
10-
margin-left: 8px;
11-
border: 0 !important;
12-
color: $nordic-blue !important;
10+
.readback-protection-warning {
11+
gap: 8px;
12+
13+
button {
14+
border: 1px solid #b75300;
15+
color: #b75300;
16+
background-color: white;
17+
18+
&:hover:not([disabled]) {
19+
color: #b75300;
20+
background-color: white;
21+
border-color: #b75300;
22+
}
23+
24+
&:focus:not([disabled]) {
25+
background-color: white;
26+
border-color: #b75300 !important;
27+
}
28+
29+
&:active:not([disabled]) {
30+
background-color: color.scale(white, $lightness: -10%);
31+
}
32+
}
1333
}

0 commit comments

Comments
 (0)