Commit 28db0631 authored by Mattias J Duffy's avatar Mattias J Duffy

better scrollbars

parent 73580b32
......@@ -11,6 +11,7 @@ import Chip from 'material-ui/Chip';
import WeekHours from './WeekHours';
import { toggleSidebar } from '../actions/ui';
import FacilityTags from './FacilityTags';
import { Scrollbars } from 'react-custom-scrollbars';
const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, toggleSidebarMap, facilities}) => {
......@@ -48,7 +49,7 @@ const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, toggleSidebarMap, f
</div>
</div>
<Divider className={'sidebar-divider'}/>
<div className={'sidebar-scroll'}>
<Scrollbars className={'sidebar-scroll'}>
<div className={'sidebar-label-holder'}>
<TextwTitle label="Building" content="The Johnson Center"/>
<TextwTitle label="Address" content="https://amenufromaplace.com"/>
......@@ -56,7 +57,7 @@ const Sidebar = ({facility, isSidebarOpen, isSidebarMapOpen, toggleSidebarMap, f
<TextwTitle label="Tags" content={<FacilityTags facility={facility} />}/>
<TextwTitle label="Hours" content={<WeekHours facility={facility} />}/>
</div>
</div>
</Scrollbars>
<div className={'sidebar-row2'}>
<FacilitiesMap isMapOpen={isSidebarMapOpen} facilities={facilities} facility={facility}/>
......
......@@ -8,6 +8,7 @@ import CardContainer from '../components/CardContainer';
import SearchBar from './SearchBar';
import KeyboardArrowLeft from 'material-ui-icons/KeyboardArrowLeft';
import KeyboardArrowRight from 'material-ui-icons/KeyboardArrowRight';
import { Scrollbars } from 'react-custom-scrollbars';
class Layout extends React.Component {
......@@ -46,10 +47,10 @@ class Layout extends React.Component {
}}/>
<div className={'layout-container'}>
<div className={'layout-main-content'}>
<div className={'layout-card-container'}>
<Scrollbars className={'layout-card-container'}>
<CardContainer styles={'layout-card-container'} searchTerm={searchTerm} campusRegion={campusRegion}
facilities={facilities} />
</div>
</Scrollbars>
</div>
<Sidebar facilities={facilities} facility={selectedFacility} isSidebarOpen={isSidebarOpen}
......
......@@ -82,7 +82,7 @@
width: 100%;
}
.sidebar-scroll{
height:calc(100% - 220px - 116px - 32px);
height:calc(100% - 220px - 116px - 32px) !important;
overflow-y: auto;
}
......
......@@ -53,13 +53,13 @@
.layout-card-container {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
// overflow-y: auto;
// overflow-x: hidden;
}
.layout-card-container::-webkit-scrollbar {
display: none;
}
// .layout-card-container::-webkit-scrollbar {
// display: none;
// }
@media screen and (max-width: map-get($breakpoints, lg) - 1px) {
.layout-sidebar-toggle-container {
......
......@@ -101,6 +101,10 @@ acorn@^5.0.0, acorn@^5.1.0, acorn@^5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.2.1.tgz#317ac7821826c22c702d66189ab8359675f135d7"
add-px-to-style@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/add-px-to-style/-/add-px-to-style-1.0.0.tgz#d0c135441fa8014a8137904531096f67f28f263a"
address@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/address/-/address-1.0.2.tgz#480081e82b587ba319459fef512f516fe03d58af"
......@@ -2157,6 +2161,14 @@ dom-converter@~0.1:
dependencies:
utila "~0.3"
dom-css@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/dom-css/-/dom-css-2.1.0.tgz#fdbc2d5a015d0a3e1872e11472bbd0e7b9e6a202"
dependencies:
add-px-to-style "1.0.0"
prefix-style "2.0.1"
to-camel-case "1.0.0"
dom-helpers@^3.2.0, dom-helpers@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.2.1.tgz#3203e07fed217bd1f424b019735582fc37b2825a"
......@@ -3592,6 +3604,10 @@ inquirer@^0.12.0:
strip-ansi "^3.0.0"
through "^2.3.6"
install@^0.10.2:
version "0.10.2"
resolved "https://registry.yarnpkg.com/install/-/install-0.10.2.tgz#f1f71902797e5a900069fb9ab80c94055025ffdc"
internal-ip@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c"
......@@ -5752,6 +5768,10 @@ postcss@^6.0.1, postcss@^6.0.2:
source-map "^0.6.1"
supports-color "^4.4.0"
prefix-style@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/prefix-style/-/prefix-style-2.0.1.tgz#66bba9a870cfda308a5dc20e85e9120932c95a06"
prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
......@@ -5923,6 +5943,12 @@ quote-stream@~0.0.0:
minimist "0.0.8"
through2 "~0.4.1"
raf@^3.1.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575"
dependencies:
performance-now "^2.1.0"
rafl@~1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/rafl/-/rafl-1.2.2.tgz#fe930f758211020d47e38815f5196a8be4150740"
......@@ -5993,6 +6019,14 @@ react-classnames@^0.1.2:
dependencies:
react "*"
react-custom-scrollbars@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/react-custom-scrollbars/-/react-custom-scrollbars-4.2.1.tgz#830fd9502927e97e8a78c2086813899b2a8b66db"
dependencies:
dom-css "^2.0.0"
prop-types "^15.5.10"
raf "^3.1.0"
react-dev-utils@^3.0.2, react-dev-utils@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/react-dev-utils/-/react-dev-utils-3.1.1.tgz#09ae7209a81384248db56547e718e65bd3b20eb5"
......@@ -7358,10 +7392,26 @@ to-arraybuffer@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
to-camel-case@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/to-camel-case/-/to-camel-case-1.0.0.tgz#1a56054b2f9d696298ce66a60897322b6f423e46"
dependencies:
to-space-case "^1.0.0"
to-fast-properties@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
to-no-case@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/to-no-case/-/to-no-case-1.0.2.tgz#c722907164ef6b178132c8e69930212d1b4aa16a"
to-space-case@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/to-space-case/-/to-space-case-1.0.0.tgz#b052daafb1b2b29dc770cea0163e5ec0ebc9fc17"
dependencies:
to-no-case "^1.0.0"
to-utf8@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/to-utf8/-/to-utf8-0.0.1.tgz#d17aea72ff2fba39b9e43601be7b3ff72e089852"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment