Skip to content

Commit

Permalink
add search icon to left of quick search, placeholder is italic
Browse files Browse the repository at this point in the history
  • Loading branch information
matttdawson committed Jul 1, 2024
1 parent 5c85e23 commit 8a5b122
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/gridFilter/GridFilterQuick.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LuiIcon } from "@linzjs/lui";
import { useContext, useEffect, useState } from "react";

import { GridContext } from "../../contexts/GridContext";
Expand All @@ -17,11 +18,14 @@ export const GridFilterQuick = ({ quickFilterPlaceholder, defaultValue }: GridFi

return (
<div className="GridFilterQuick-container">
<div className="GridFilterQuick-icon">
<LuiIcon name={"ic_search"} alt={"Search"} size={"md"} />
</div>
<input
aria-label="Search"
className="GridFilterQuick-input"
type="text"
placeholder={quickFilterPlaceholder ?? "Search..."}
placeholder={quickFilterPlaceholder ?? "Search"}
value={quickFilterValue}
onChange={(event) => {
setQuickFilterValue(event.target.value);
Expand Down
13 changes: 12 additions & 1 deletion src/styles/Grid.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,26 @@
flex: 1;
}

.GridFilterQuick-icon {
position: absolute;
margin: 8px;
pointer-events: none;
fill: colors.$fuscous;
}

.GridFilterQuick-input {
width: 100%;
height: 40px;
min-height: 40px;
border: 0.06rem solid colors.$silver;
border-radius: 3px;
padding-left: 0.75rem;
padding-left: 36px;
padding-right: 0.75rem;
font-family: "Open Sans", system-ui, sans-serif;

&::placeholder {
font-style: italic;
}
}

.Grid-popoverContainer {
Expand Down

0 comments on commit 8a5b122

Please sign in to comment.