forked from cobudget/cobudget
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add search for members on paginated member page (cobudget#369)
- Loading branch information
1 parent
8a85e26
commit d507619
Showing
8 changed files
with
238 additions
and
1,076 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
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
COOKIE_SECRET="A_LONG_RANDOM_VALUE_THAT_IS_NOT_THIS_STRING" | ||
DATABASE_URL="" | ||
POSTMARK_FROM_EMAIL="fake" | ||
POSTMARK_API_TOKEN="fake" | ||
MAGIC_LINK_SECRET="" | ||
MAGIC_LINK_SECRET="fake" | ||
FROM_EMAIL="" |
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,32 @@ | ||
import React from "react"; | ||
import { SearchIcon, CloseIcon } from "../Icons"; | ||
|
||
export default ({ placeholder, collection, clearInput, value, onChange }) => { | ||
return ( | ||
<div | ||
className={`bg-white shadow-sm rounded-md border-transparent focus-within:border-${collection.color} border-3 px-1 relative pr-10 flex items-center overflow-hidden`} | ||
> | ||
<input | ||
className="appearance-none block px-3 py-2 w-full placeholder-gray-400 text-gray-600 focus:text-gray-800 focus:outline-none" | ||
type="text" | ||
placeholder={placeholder} | ||
value={value} | ||
onChange={onChange} | ||
autoFocus | ||
/> | ||
<button | ||
className={ | ||
`h-full absolute inset-y-0 right-0 flex items-center p-3 focus:outline-none transition-colors` + | ||
" " + | ||
(value !== "" ? `bg-${collection.color} text-white` : "text-gray-400") | ||
} | ||
> | ||
{value === "" ? ( | ||
<SearchIcon className="h-5 w-5" /> | ||
) : ( | ||
<CloseIcon className="h-5 w-5" onClick={clearInput} /> | ||
)} | ||
</button> | ||
</div> | ||
); | ||
}; |
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
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
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
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
Oops, something went wrong.