Skip to content

Commit 01ed265

Browse files
authored
fix: migrate OfflineBanner styles to Tailwind CSS
1 parent 089df09 commit 01ed265

3 files changed

Lines changed: 8 additions & 40 deletions

File tree

src/components/OfflineBanner/OfflineBanner.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useEffect, useState } from "react";
22
import isClient from "../../utilities/is-client.js";
3-
import "./OfflineBanner.scss";
43

54
export default function OfflineBanner() {
65
const [online, setOnline] = useState(() =>
@@ -26,21 +25,21 @@ export default function OfflineBanner() {
2625

2726
return (
2827
<div
29-
className="offline-banner"
28+
className="flex items-center justify-center px-20 py-[8px] bg-blue-600 text-white text-14 font-medium text-center border-b border-blue-800"
3029
role="status"
3130
aria-live="polite"
3231
data-testid="offline-banner"
3332
>
34-
<div className="offline-banner__content">
33+
<div className="flex items-center gap-[8px]">
3534
<svg
36-
className="offline-banner__icon"
35+
className="shrink-0 w-[16px] h-[16px] fill-blue-200"
3736
aria-hidden="true"
3837
viewBox="0 0 24 24"
3938
xmlns="http://www.w3.org/2000/svg"
4039
>
4140
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" />
4241
</svg>
43-
<span className="offline-banner__text">
42+
<span className="tracking-[0.01em]">
4443
You are currently offline. Some features may be unavailable.
4544
</span>
4645
</div>

src/components/OfflineBanner/OfflineBanner.scss

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/components/OfflineBanner/__snapshots__/OfflineBanner.test.jsx.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
exports[`OfflineBanner renders the offline banner snapshot 1`] = `
44
<div
55
aria-live="polite"
6-
class="offline-banner"
6+
class="flex items-center justify-center px-20 py-[8px] bg-blue-600 text-white text-14 font-medium text-center border-b border-blue-800"
77
data-testid="offline-banner"
88
role="status"
99
>
1010
<div
11-
class="offline-banner__content"
11+
class="flex items-center gap-[8px]"
1212
>
1313
<svg
1414
aria-hidden="true"
15-
class="offline-banner__icon"
15+
class="shrink-0 w-[16px] h-[16px] fill-blue-200"
1616
viewBox="0 0 24 24"
1717
xmlns="http://www.w3.org/2000/svg"
1818
>
@@ -21,7 +21,7 @@ exports[`OfflineBanner renders the offline banner snapshot 1`] = `
2121
/>
2222
</svg>
2323
<span
24-
class="offline-banner__text"
24+
class="tracking-[0.01em]"
2525
>
2626
You are currently offline. Some features may be unavailable.
2727
</span>

0 commit comments

Comments
 (0)