@@ -311,7 +311,7 @@ export function IconSearch({ icons }: IconSearchProps) {
}}
className="cursor-pointer focus: focus:bg-rose-50 dark:focus:bg-rose-950/20"
>
- Clear all filters
+ Clear categories
>
)}
@@ -327,18 +327,18 @@ export function IconSearch({ icons }: IconSearchProps) {
- Sort By
+ Sort Icons
handleSortChange(value as SortOption)}>
- Best match
+ Relevance
- A to Z
+ Name (A-Z)
- Z to A
+ Name (Z-A)
@@ -350,9 +350,15 @@ export function IconSearch({ icons }: IconSearchProps) {
{/* Clear all button */}
{(searchQuery || selectedCategories.length > 0 || sortOption !== "relevance") && (
-
@@ -360,7 +366,7 @@ export function IconSearch({ icons }: IconSearchProps) {
{/* Active filter badges */}
{selectedCategories.length > 0 && (
-
Filters:
+
Selected:
{selectedCategories.map((category) => (
@@ -386,7 +392,7 @@ export function IconSearch({ icons }: IconSearchProps) {
}}
className="text-xs h-7 px-2 cursor-pointer"
>
- Clear all
+ Clear
)}
@@ -397,27 +403,33 @@ export function IconSearch({ icons }: IconSearchProps) {
{filteredIcons.length === 0 ? (
-
We don't have this one...yet!
+
Icon not found
+
Help us expand our collection
+
+
+
+
+ Can't submit it yourself?
+ {
+ setIsLazyRequestSubmitted(true)
+ toast("Request received!", {
+ description: `We've noted your request for "${searchQuery || "this icon"}". Thanks for your suggestion.`,
+ })
+ posthog.capture("lazy icon request", {
+ query: searchQuery,
+ categories: selectedCategories,
+ })
+ }}
+ disabled={isLazyRequestSubmitted}
+ >
+ Request this icon
+
+
-
{
- setIsLazyRequestSubmitted(true)
- toast("We hear you!", {
- description: `Okay, okay... we'll consider adding "${searchQuery || "that icon"}" just for you. 😉`,
- })
- posthog.capture("lazy icon request", {
- query: searchQuery,
- categories: selectedCategories,
- })
- }}
- disabled={isLazyRequestSubmitted}
- >
- I want this icon added but I'm too lazy to add it myself
-
-
) : (
<>
@@ -438,3 +450,51 @@ export function IconSearch({ icons }: IconSearchProps) {
>
)
}
+
+function IconCard({
+ name,
+ data: iconData,
+ matchedAlias,
+}: {
+ name: string
+ data: Icon
+ matchedAlias?: string | null
+}) {
+ return (
+
+
+
+
+
+
+ {name.replace(/-/g, " ")}
+
+
+ {matchedAlias && Alias: {matchedAlias}}
+
+
+ )
+}
+
+interface IconsGridProps {
+ filteredIcons: { name: string; data: Icon }[]
+ matchedAliases: Record
+}
+
+function IconsGrid({ filteredIcons, matchedAliases }: IconsGridProps) {
+ return (
+ <>
+
+ {filteredIcons.slice(0, 120).map(({ name, data }) => (
+
+ ))}
+
+ {filteredIcons.length > 120 && And {filteredIcons.length - 120} more...
}
+ >
+ )
+}