Skip to content

Commit

Permalink
feat(InputMenu): new component to search for track titles
Browse files Browse the repository at this point in the history
  • Loading branch information
rwieruch committed May 29, 2016
1 parent 61f229f commit 78c6335
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/FilterName/index.js
Expand Up @@ -4,6 +4,7 @@ import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actions from '../../actions/index';
import { ButtonInline } from '../../components/ButtonInline';
import { InputMenu } from '../../components/InputMenu';

function FilterName({
filterNameQuery,
Expand All @@ -24,7 +25,11 @@ function FilterName({
</ButtonInline>
</div>
<div className="stream-interaction-content">
<input onChange={(event) => onNameFilter(event.target.value.toLowerCase())} value={filterNameQuery} />
<InputMenu
placeholder="SEARCH..."
onChange={(event) => onNameFilter(event.target.value.toLowerCase())}
value={filterNameQuery}
/>
</div>
</div>
);
Expand Down
17 changes: 17 additions & 0 deletions src/components/InputMenu/index.js
@@ -0,0 +1,17 @@
import React from 'react';

function InputMenu({ value, onChange, placeholder }) {
return (
<input
type="text"
className="input-menu"
placeholder={placeholder}
onChange={onChange}
value={value}
/>
);
}

export {
InputMenu
};
10 changes: 10 additions & 0 deletions styles/components/inputMenu.scss
@@ -0,0 +1,10 @@
.input-menu {
font-size: $menuSize;
color: $fontColor;
border: 0;
background-color: $backgroundSecondary;

&:focus {
outline: none;
}
}
1 change: 1 addition & 0 deletions styles/index.scss
Expand Up @@ -20,3 +20,4 @@
@import 'components/buttonGhost';
@import 'components/buttonActive';
@import 'components/streamInteractions';
@import 'components/inputMenu';

0 comments on commit 78c6335

Please sign in to comment.