Skip to content

Commit 671b0db

Browse files
committed
fix popup not show up
1 parent 213ea86 commit 671b0db

4 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎src/components/SearchBar.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export default class SearchBar extends React.Component {
4848
<div className='search-bar__desc'>
4949
Search over GitHub, Bitbucket, GitLab to find real-world usage variable names
5050
</div>
51-
<Input ref={this.input} className='search-bar__input'
51+
<Input ref={this.input}
52+
className={`search-bar__input${this.props.variableList.length ? ' search-bar__input--dark' :''}`}
5253
icon fluid placeholder={this.props.placeholder} size={this.state.inputSize}>
5354
<Dropdown text='' icon='filter' className='search-bar__dropdown'>
5455
<Dropdown.Menu>

‎src/components/VariableList.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export default class VariableList extends React.Component {
5858
renderPage() {
5959
let pages = [];
6060
this.props.variableList.forEach(list => {
61-
const variables = list.map((variable, i) => {
62-
return <Variable key={i} {...variable} {...this.props}/>
61+
const variables = list.map(variable => {
62+
return <Variable key={Tools.uuid()} {...variable} {...this.props}/>
6363
});
6464
if (variables && variables.length) {
6565
if (pages.length) {

‎styles/_common.scss‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ html, body {
88
width: 100%;
99
font-size: 1rem;
1010
line-height: 1.5;
11-
color: #373a3c;
12-
background-color: #fff;
13-
transition: all 350ms $anim-cubic-bezier;
1411
-webkit-font-smoothing: antialiased;
1512
-moz-osx-font-smoothing: grayscale;
1613
}
1714

1815
body {
16+
background: #fff;
17+
color: #373a3c;
18+
transition: all 350ms $anim-cubic-bezier;
1919
&.dark {
2020
background: $dark;
2121
color: #fff;

‎styles/_main-containers.scss‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,12 @@
100100

101101
&:focus, &:active, &:hover {
102102
box-shadow: 0 3px 8px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.08);
103-
border-color: transparent;
103+
}
104+
&--dark {
105+
box-shadow: 0 1px 5px 0 rgba(255,255,255,.2), 0 0 0 1px rgba(255,255,255,.08);
106+
&:focus, &:active, &:hover {
107+
box-shadow: 1px 3px 12px 0 rgba(255,255,255,.35), 0 0 0 1px rgba(255,255,255,.08);
108+
}
104109
}
105110

106111
input {
@@ -133,7 +138,7 @@
133138
margin: 0.4rem 0.4rem 0 0;
134139
}
135140
hr {
136-
width: 80%;
141+
width: 90%;
137142
border-color: rgba(0,0,0,.16);
138143
margin-top: 1rem;
139144
}

0 commit comments

Comments
 (0)