Skip to content

Commit 9294aa5

Browse files
authored
Add scroll component (#48)
1 parent 4f7d905 commit 9294aa5

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

demo/src/App.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ const App = () => (
1515
<Typography />
1616
<StatusCards />
1717
<div className="o-site-wrap o-site-wrap--padding">
18+
<div className="c-scroll" style={{ maxHeight: '100px' }}>
19+
<div style={{ padding: '100px 0' }}>
20+
Hello World
21+
</div>
22+
</div>
1823
<Tooltip direction="north" />
1924
<Tooltip direction="south" />
2025
<Tooltip direction="west" />

nebula-components/_components.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@import './components/pagination';
1515
@import './components/pills';
1616
@import './components/progress-bar';
17+
@import './components/scroll';
1718
@import './components/search';
1819
@import './components/select';
1920
@import './components/table';
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@if $nb-use-scroll {
2+
.#{$nb-namespace}c-scroll {
3+
overflow: auto;
4+
5+
&::-webkit-scrollbar {
6+
width: 8px;
7+
}
8+
9+
&::-webkit-scrollbar-track {
10+
background: $nb-color-white;
11+
border: 1px solid $nb-color-grey-light;
12+
}
13+
14+
&::-webkit-scrollbar-thumb {
15+
background-color: $nb-color-grey;
16+
}
17+
}
18+
}

nebula-components/settings/_feature-toggles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $nb-use-modal: true !default;
1111
$nb-use-pagination: true !default;
1212
$nb-use-pills: true !default;
1313
$nb-use-progress-bar: true !default;
14+
$nb-use-scroll: true !default;
1415
$nb-use-select: true !default;
1516
$nb-use-status-card: true !default;
1617
$nb-use-table: true !default;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy