Skip to content

Commit

Permalink
Create ItemTableFilter component
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Oct 7, 2020
1 parent ce0735c commit b95d5ac
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/components/ItemTableFilter/ItemTableFilter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import PropTypes from 'prop-types';
import { TextField } from "@material-ui/core";

export default function ItemTableFilter({ label, onChange }) {
return (
<>
<TextField
label={label}
onChange={onChange}
type="search"
size="small"
color="secondary"
variant="outlined"
fullWidth
/>
</>
);
};

ItemTableFilter.propTypes = {
/** The label that appears inside the search box. */
"label": PropTypes.string,
/** The callback function that sets a column's filter value. */
"onChange": PropTypes.func.isRequired
};

ItemTableFilter.defaultProps = {
"label": ""
}
1 change: 1 addition & 0 deletions src/components/ItemTableFilter/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "./ItemTableFilter";

0 comments on commit b95d5ac

Please sign in to comment.