Skip to content

Commit 49e4ed1

Browse files
committed
merge: main -> tailwind-centralized
2 parents 0cd5bf5 + 4361e26 commit 49e4ed1

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

js/react/lib/styles.css

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
11
@import "@rustlanges/styles";
2+
3+
@layer utilities {
4+
@supports not selector(::-webkit-scrollbar) {
5+
.scrollbar {
6+
scrollbar-color: var(--color-neutral-300) var(--color-neutral-100);
7+
8+
@variant dark {
9+
scrollbar-color: var(--color-neutral-900) var(--color-neutral-600);
10+
}
11+
}
12+
}
13+
14+
.scrollbar::-webkit-scrollbar {
15+
@apply w-4;
16+
}
17+
18+
.scrollbar::-webkit-scrollbar-track {
19+
@apply rounded-full bg-neutral-100 dark:bg-neutral-900;
20+
}
21+
22+
.scrollbar::-webkit-scrollbar-thumb {
23+
@apply rounded-full bg-neutral-300 transition dark:bg-neutral-600;
24+
}
25+
.scrollbar::-webkit-scrollbar-thumb:hover {
26+
@apply opacity-90;
27+
}
28+
}

js/react/showcase/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ export function App() {
258258
},
259259
}}
260260
/>
261+
<ShowComponent title="Scroll bar ">
262+
<div className="scrollbar mx-auto h-48 w-full overflow-auto">
263+
<div className="mx-auto flex h-96 w-20 items-center">Container</div>
264+
</div>
265+
</ShowComponent>
261266
</div>
262267
);
263268
}

0 commit comments

Comments
 (0)