-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Justin Campbell
committed
Oct 7, 2020
1 parent
ce0735c
commit b95d5ac
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./ItemTableFilter"; |