From c00fd9550b888c49be1f2f808cbf0b027f145189 Mon Sep 17 00:00:00 2001 From: domyen Date: Mon, 25 Feb 2019 13:27:49 -0500 Subject: [PATCH] Integrate ScrollArea --- .../__snapshots__/storyshots.test.js.snap | 246 ++++++++++++++++-- lib/components/src/bar/bar.js | 12 +- lib/ui/src/components/sidebar/Sidebar.js | 16 +- .../sidebar/SidebarSimpleBarStyles.js | 192 -------------- 4 files changed, 244 insertions(+), 222 deletions(-) delete mode 100644 lib/ui/src/components/sidebar/SidebarSimpleBarStyles.js diff --git a/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap b/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap index 578a43bd79c..426e693326d 100644 --- a/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap +++ b/examples/official-storybook/tests/__snapshots__/storyshots.test.js.snap @@ -2535,6 +2535,198 @@ exports[`Storyshots Basics|Placeholder twoChildren 1`] = ` `; +exports[`Storyshots Basics|ScrollArea horizontal 1`] = ` +
+
+
+
+
+
+
+
+
+ + HORIZONTAL + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus congue, nulla sed consectetur ornare, nibh dui accumsan risus, vel ullamcorper elit ipsum eget libero. Aenean dictum nisi a rutrum convallis. Nullam id viverra diam. Vivamus ut augue eget urna commodo vulputate. Donec ullamcorper lectus a nulla malesuada, eget suscipit dui molestie. Suspendisse ac nulla in mi dignissim ornare id quis est. Morbi ut condimentum lorem, eu porta mi. Proin lacinia ac neque ultricies dictum. Mauris placerat ornare bibendum. Fusce porttitor quis ante ac consectetur. Sed finibus eu magna eu sollicitudin. Vivamus tellus tortor, tincidunt sed arcu tempus, suscipit feugiat est. Ut sit amet libero eget odio euismod tempor et nec velit. + +
+
+
+
+
+
+
+
+
+
+
+
+
+`; + +exports[`Storyshots Basics|ScrollArea vertical 1`] = ` +
+
+
+
+
+
+
+
+
+ + VERTICAL + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus congue, nulla sed consectetur ornare, nibh dui accumsan risus, vel ullamcorper elit ipsum eget libero. Aenean dictum nisi a rutrum convallis. Nullam id viverra diam. Vivamus ut augue eget urna commodo vulputate. Donec ullamcorper lectus a nulla malesuada, eget suscipit dui molestie. Suspendisse ac nulla in mi dignissim ornare id quis est. Morbi ut condimentum lorem, eu porta mi. Proin lacinia ac neque ultricies dictum. Mauris placerat ornare bibendum. Fusce porttitor quis ante ac consectetur. Sed finibus eu magna eu sollicitudin. Vivamus tellus tortor, tincidunt sed arcu tempus, suscipit feugiat est. Ut sit amet libero eget odio euismod tempor et nec velit. +
+
+
+
+
+
+
+
+
+
+
+
+
+`; + +exports[`Storyshots Basics|ScrollArea verticalCustomStyling 1`] = ` +.emotion-0 .simplebar-scrollbar:before { + background: purple; +} + +.emotion-0 .simplebar-track.simplebar-vertical { + right: 20px; +} + +.emotion-0 .simplebar-scrollbar:before { + background: purple; +} + +.emotion-0 .simplebar-track.simplebar-vertical { + right: 20px; +} + +
+
+
+
+
+
+
+
+
+ + VERTICAL CUSTOM STYLING + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus congue, nulla sed consectetur ornare, nibh dui accumsan risus, vel ullamcorper elit ipsum eget libero. Aenean dictum nisi a rutrum convallis. Nullam id viverra diam. Vivamus ut augue eget urna commodo vulputate. Donec ullamcorper lectus a nulla malesuada, eget suscipit dui molestie. Suspendisse ac nulla in mi dignissim ornare id quis est. Morbi ut condimentum lorem, eu porta mi. Proin lacinia ac neque ultricies dictum. Mauris placerat ornare bibendum. Fusce porttitor quis ante ac consectetur. Sed finibus eu magna eu sollicitudin. Vivamus tellus tortor, tincidunt sed arcu tempus, suscipit feugiat est. Ut sit amet libero eget odio euismod tempor et nec velit. +
+
+
+
+
+
+
+
+
+
+
+
+
+`; + exports[`Storyshots Core|Events Force re-render 1`] = ` .emotion-0 { border: 0; @@ -5117,7 +5309,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` fill: currentColor; } -.emotion-81 { +.emotion-82 { display: block; padding: 16px 20px; border-radius: 10px; @@ -5139,7 +5331,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` display: none; } -.emotion-84 { +.emotion-85 { position: absolute; z-index: 1; left: 0; @@ -5152,6 +5344,10 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` overflow-x: hidden; } +.emotion-80 .simplebar-track.simplebar-vertical { + right: 4px; +} + .emotion-7 { display: -webkit-box; display: -webkit-flex; @@ -5314,7 +5510,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` height: 48px; } -.emotion-83 { +.emotion-84 { position: fixed; display: block; bottom: 20px; @@ -5523,7 +5719,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` fill: currentColor; } -.emotion-81 { +.emotion-82 { display: block; padding: 16px 20px; border-radius: 10px; @@ -5545,7 +5741,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` display: none; } -.emotion-84 { +.emotion-85 { position: absolute; z-index: 1; left: 0; @@ -5558,6 +5754,10 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` overflow-x: hidden; } +.emotion-80 .simplebar-track.simplebar-vertical { + right: 4px; +} + .emotion-7 { display: -webkit-box; display: -webkit-flex; @@ -5720,7 +5920,7 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` height: 48px; } -.emotion-83 { +.emotion-84 { position: fixed; display: block; bottom: 20px; @@ -5878,9 +6078,10 @@ exports[`Storyshots UI|Sidebar/Sidebar loading 1`] = ` }