mirror of
https://github.com/strapi/strapi.git
synced 2025-07-25 18:05:07 +00:00
Init search component
This commit is contained in:
parent
c8492a6b11
commit
fc5434037f
@ -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;
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -26,6 +26,7 @@ import PopUpWarning from 'components/PopUpWarning';
|
|||||||
import AddFilterCTA from 'components/AddFilterCTA';
|
import AddFilterCTA from 'components/AddFilterCTA';
|
||||||
import FiltersPickWrapper from 'components/FiltersPickWrapper/Loadable';
|
import FiltersPickWrapper from 'components/FiltersPickWrapper/Loadable';
|
||||||
import Filter from 'components/Filter/Loadable';
|
import Filter from 'components/Filter/Loadable';
|
||||||
|
import Search from 'components/Search';
|
||||||
import Table from 'components/Table';
|
import Table from 'components/Table';
|
||||||
|
|
||||||
// Utils located in `strapi/packages/strapi-helper-plugin/lib/src/utils`;
|
// Utils located in `strapi/packages/strapi-helper-plugin/lib/src/utils`;
|
||||||
@ -342,6 +343,7 @@ export class ListPage extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className={cn('container-fluid', styles.containerFluid)}>
|
<div className={cn('container-fluid', styles.containerFluid)}>
|
||||||
|
<Search />
|
||||||
<PluginHeader
|
<PluginHeader
|
||||||
actions={pluginHeaderActions}
|
actions={pluginHeaderActions}
|
||||||
description={{
|
description={{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user