feat: Add search input to collection and home (#1149)

* feat: Add search input to collection and home

* Tweak spacing

* Add input to drafts/starred too
This commit is contained in:
Tom Moor
2020-01-09 19:14:34 -08:00
committed by GitHub
parent 0ccbc6126b
commit cd3035a692
9 changed files with 150 additions and 12 deletions

View File

@ -29,6 +29,7 @@ import Heading from 'components/Heading';
import Tooltip from 'components/Tooltip';
import CenteredContent from 'components/CenteredContent';
import { ListPlaceholder } from 'components/LoadingPlaceholder';
import InputSearch from 'components/InputSearch';
import Mask from 'components/Mask';
import Button from 'components/Button';
import HelpText from 'components/HelpText';
@ -114,12 +115,19 @@ class CollectionScene extends React.Component<Props> {
};
renderActions() {
const can = this.props.policies.abilities(this.props.match.params.id);
const { match, policies } = this.props;
const can = policies.abilities(match.params.id);
return (
<Actions align="center" justify="flex-end">
{can.update && (
<React.Fragment>
<Action>
<InputSearch
placeholder="Search in collection…"
collectionId={match.params.id}
/>
</Action>
<Action>
<Tooltip
tooltip="New document"