Skip to content
This repository was archived by the owner on Jul 16, 2020. It is now read-only.

Commit 6d47930

Browse files
author
ricokahler
committed
scroll improvements
1 parent fb5a81d commit 6d47930

File tree

2 files changed

+31
-5
lines changed

2 files changed

+31
-5
lines changed

src/client/components/giant-autosuggest.tsx

+25-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,30 @@ const Suggestions = styled(View)`
1818
position: absolute;
1919
top: 100%;
2020
width: 100%;
21-
box-shadow: ${styles.boxShadow(-1)};
22-
background-color: ${styles.deepCove};
21+
background-color: ${styles.blackTer};
22+
max-height: 15rem;
23+
overflow: scroll;
24+
& > * {
25+
flex: 0 0 auto;
26+
}
27+
&::-webkit-scrollbar {
28+
-webkit-appearance: none;
29+
}
30+
31+
&::-webkit-scrollbar:vertical {
32+
width: 11px;
33+
}
34+
35+
&::-webkit-scrollbar-thumb {
36+
border-radius: 8px;
37+
border: 2px solid ${styles.blackTer};
38+
background-color: ${styles.gray};
39+
}
40+
41+
&::-webkit-scrollbar-track:vertical {
42+
background-color: ${styles.blackTer};
43+
border-radius: 8px;
44+
}
2345
`;
2446
const SuggestionWrapper = styled(View)``;
2547
const DontSee = styled(Text)`
@@ -29,6 +51,7 @@ const DontSee = styled(Text)`
2951
&:hover {
3052
text-decoration: underline;
3153
color: ${styles.turbo};
54+
background-color: ${styles.deepKoamaru};
3255
}
3356
&:active {
3457
color: ${styles.beeKeeper};

src/client/routes/welcome/welcome.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const Suggestion = styled<SuggestionProps>(Text)`
6161
font-size: ${styles.space(2)};
6262
background-color: ${props => (props.selected ? styles.deepKoamaru : 'transparent')};
6363
color: ${styles.turbo};
64+
padding: ${styles.space(0)};
6465
`;
6566
const Mail = styled.a`
6667
color: ${styles.turbo};
@@ -99,7 +100,7 @@ interface WelcomeProps {
99100
interface WelcomeState {
100101
gotStarted: boolean;
101102
search: string;
102-
dontSeeModalOpen: boolean;
103+
selectedDegreeId: string | undefined;
103104
}
104105

105106
const getDisplayText = (degree: Model.MasteredDegree.Model) => degree.name;
@@ -109,7 +110,7 @@ export class Welcome extends React.PureComponent<WelcomeProps, WelcomeState> {
109110
state: WelcomeState = {
110111
gotStarted: false,
111112
search: '',
112-
dontSeeModalOpen: false,
113+
selectedDegreeId: undefined,
113114
};
114115

115116
searchRef = React.createRef<HTMLInputElement>();
@@ -147,7 +148,9 @@ export class Welcome extends React.PureComponent<WelcomeProps, WelcomeState> {
147148
this.setState({ search });
148149
};
149150

150-
handleSelectDegree = (degreeId: string) => {};
151+
handleSelectDegree = (selectedDegreeId: string) => {
152+
this.setState({ selectedDegreeId });
153+
};
151154
handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {};
152155
handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {};
153156

0 commit comments

Comments
 (0)