Update searching

This commit is contained in:
Justin Edmund 2022-12-22 01:07:27 -08:00
parent 55a292529f
commit e9b4f44fd6
7 changed files with 16 additions and 7 deletions

View file

@ -28,7 +28,7 @@
gap: $unit-half;
h5 {
color: var(--text-secondary);
color: var(--text-tertiary);
display: inline-block;
font-size: $font-medium;
font-weight: $medium;

View file

@ -7,6 +7,14 @@
display: block;
padding: $unit-2x;
width: 100%;
&.Bound {
background-color: var(--input-bound-bg);
&:hover {
background-color: var(--input-bound-bg-hover);
}
}
}
.InputError {

View file

@ -16,11 +16,12 @@ const Input = React.forwardRef<HTMLInputElement, Props>(function input(
forwardedRef
) {
const classes = classNames({ Input: true }, props.className)
const { value, ...inputProps } = props
return (
<label className="Label" htmlFor={props.name}>
<input
{...props}
{...inputProps}
autoComplete="off"
className={classes}
defaultValue={props.value || ''}

View file

@ -56,7 +56,7 @@
}
h5 {
color: var(--text-secondary);
color: var(--text-tertiary);
display: inline-block;
font-size: $font-medium;
font-weight: $medium;

View file

@ -89,7 +89,7 @@ const SearchModal = (props: Props) => {
setRecordCount(response.data.meta.count)
if (replace) {
replaceResults(response.data.count, response.data.results)
replaceResults(response.data.meta.count, response.data.results)
} else {
appendResults(response.data.results)
}
@ -330,7 +330,7 @@ const SearchModal = (props: Props) => {
<div id="Bar">
<Input
autoComplete="off"
className="Search"
className="Search Bound"
name="query"
placeholder={props.placeholderText}
ref={searchInput}

View file

@ -28,7 +28,7 @@
gap: $unit-half;
h5 {
color: var(--text-secondary);
color: var(--text-tertiary);
display: inline-block;
font-size: $font-medium;
font-weight: $medium;

View file

@ -28,7 +28,7 @@
gap: $unit-half;
h5 {
color: var(--text-secondary);
color: var(--text-tertiary);
display: inline-block;
font-size: $font-medium;
font-weight: $medium;