Init search component

This commit is contained in:
soupette 2018-06-06 18:51:24 +02:00
parent c8492a6b11
commit fc5434037f
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,27 @@
/*
*
* Search
*
*/
import React from 'react';
import styles from './styles.scss';
class Search extends React.Component {
state = { value: '' };
handleChange = ({ target }) => {
this.setState({ value: target.value });
}
render() {
return (
<div className={styles.search}>
<input type="text" onChange={this.handleChange} value={this.state.value} />
</div>
);
}
}
export default Search;

View File

@ -0,0 +1,24 @@
.search{
position: fixed;
display: flex;
top: 0;
height: 6rem;
min-width: 44rem;
line-height: 6rem;
z-index: 999;
background-color: #FFFFFF;
color: #B3B5B9;
border-right: 1px solid #F3F4F4;
overflow: auto;
&:before {
content: '\f002';
margin-right: 10px;
font-family: 'FontAwesome';
font-size: 1.3rem;
font-weight: bolder;
}
input {
width: 60%;
outline: 0;
}
}

View File

@ -26,6 +26,7 @@ import PopUpWarning from 'components/PopUpWarning';
import AddFilterCTA from 'components/AddFilterCTA';
import FiltersPickWrapper from 'components/FiltersPickWrapper/Loadable';
import Filter from 'components/Filter/Loadable';
import Search from 'components/Search';
import Table from 'components/Table';
// Utils located in `strapi/packages/strapi-helper-plugin/lib/src/utils`;
@ -342,6 +343,7 @@ export class ListPage extends React.Component {
return (
<div>
<div className={cn('container-fluid', styles.containerFluid)}>
<Search />
<PluginHeader
actions={pluginHeaderActions}
description={{