Skip to content

Commit 032f114

Browse files
committed
replace Material Design icons with Lucide icons for consistency across multiple components
1 parent 07e3b89 commit 032f114

File tree

10 files changed

+40
-87
lines changed

10 files changed

+40
-87
lines changed

src/components/DocsLayout.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const useMenuConfig = ({
8080
{
8181
label: (
8282
<div className="flex items-center gap-2">
83-
GitHub <GithubIcon className="opacity-20" size={16} />
83+
GitHub <GithubIcon className="opacity-20" />
8484
</div>
8585
),
8686
to: `https://github.com/${repo}`,
@@ -141,14 +141,11 @@ type DocsLayoutProps = {
141141
}
142142

143143
export function DocsLayout({
144-
name,
145-
version,
146144
colorFrom,
147145
colorTo,
148146
textColor,
149147
config,
150148
frameworks,
151-
versions,
152149
repo,
153150
children,
154151
}: DocsLayoutProps) {

src/components/FilterComponents.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as React from 'react'
22
import { useState } from 'react'
3-
import { MdExpandMore } from 'react-icons/md'
4-
import { Table, List } from 'lucide-react'
3+
import { Table, List, ChevronDown } from 'lucide-react'
54
import { useDebouncedValue } from '@tanstack/react-pacer'
65
import { twMerge } from 'tailwind-merge'
76

@@ -67,7 +66,7 @@ export function FilterSection({
6766
className="flex items-center gap-1.5 text-sm font-medium text-gray-900 dark:text-gray-100 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg transition-colors flex-1 py-0"
6867
>
6968
<span>{title}</span>
70-
<MdExpandMore
69+
<ChevronDown
7170
className={twMerge(
7271
'w-3.5 h-3.5 transition-transform',
7372
!isExpanded && 'rotate-90',
@@ -186,11 +185,8 @@ interface FilterBarProps {
186185
export function FilterBar({
187186
children,
188187
title = 'Filters',
189-
onClearFilters,
190-
hasActiveFilters,
191188
mobileControls,
192189
desktopHeader,
193-
viewMode,
194190
}: FilterBarProps) {
195191
const [isOpen, setIsOpen] = useState(false)
196192

@@ -207,7 +203,7 @@ export function FilterBar({
207203
<span className="text-sm font-semibold text-gray-900 dark:text-white">
208204
{title}
209205
</span>
210-
<MdExpandMore
206+
<ChevronDown
211207
className={twMerge(
212208
'w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform flex-shrink-0',
213209
!isOpen && 'rotate-90',

src/components/Navbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function Navbar({ children }: { children: React.ReactNode }) {
9797
<Authenticated>
9898
{!canAdmin ? (
9999
<div className="flex items-center gap-2 px-2 py-1 rounded-lg">
100-
<User />
100+
<User size={16} />
101101
<Link
102102
to="/account"
103103
className="flex-1 text-sm font-medium text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white whitespace-nowrap"
@@ -377,7 +377,7 @@ export function Navbar({ children }: { children: React.ReactNode }) {
377377
'rounded-lg hover:bg-gray-500/10 dark:hover:bg-gray-500/30',
378378
)}
379379
>
380-
<Users />
380+
<Users size={14} />
381381
Contributors
382382
</Link>
383383
</div>

src/components/SearchButton.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react'
2-
import { Command } from 'lucide-react'
3-
import { MdSearch } from 'react-icons/md'
2+
import { Command, Search } from 'lucide-react'
43
import { twMerge } from 'tailwind-merge'
54
import { useSearchContext } from '~/contexts/SearchContext'
65

@@ -21,7 +20,7 @@ export function SearchButton({ className }: SearchButtonProps) {
2120
)}
2221
>
2322
<div className="flex items-center gap-1 text-sm">
24-
<MdSearch className="text-lg" /> Search...
23+
<Search size={18} /> Search...
2524
</div>
2625
<div className="flex items-center bg-white/50 dark:bg-gray-500/50 rounded-md px-2 py-1 gap-1 font-bold text-xs whitespace-nowrap">
2726
<Command size={12} /> + K

src/components/SearchModal.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import {
1212
Pagination,
1313
} from 'react-instantsearch'
1414
import { liteClient } from 'algoliasearch/lite'
15-
import { X } from 'lucide-react'
16-
import { MdSearch } from 'react-icons/md'
15+
import { X, Search } from 'lucide-react'
1716
import { Link, useRouterState } from '@tanstack/react-router'
1817
import { useSearchContext } from '~/contexts/SearchContext'
1918
import { libraries } from '~/libraries'
@@ -309,7 +308,7 @@ function NoResults() {
309308
}
310309

311310
const submitIconComponent = () => {
312-
return <MdSearch />
311+
return <Search size={18} />
313312
}
314313

315314
const resetIconComponent = () => {

src/routes/$libraryId/$version.docs.contributors.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ import { DocContainer } from '~/components/DocContainer'
44
import { DocTitle } from '~/components/DocTitle'
55
import { getLibrary } from '~/libraries'
66
import { ContributorsWall } from '~/components/ContributorsWall'
7-
import {} from '@tanstack/react-router'
87
import { getLibraryContributors } from '~/libraries/maintainers'
98
import {
109
MaintainerCard,
1110
CompactMaintainerCard,
1211
MaintainerRowCard,
1312
} from '~/components/MaintainerCard'
14-
import { MdViewList, MdViewModule, MdFormatListBulleted } from 'react-icons/md'
1513
import { useState } from 'react'
14+
import { Grid2X2, Grid3X3, LayoutList } from 'lucide-react'
1615

1716
export const Route = createFileRoute('/$libraryId/$version/docs/contributors')({
1817
component: RouteComponent,
@@ -64,7 +63,7 @@ function RouteComponent() {
6463
}`}
6564
title="Compact cards"
6665
>
67-
<MdViewList className="w-5 h-5" />
66+
<Grid3X3 className="w-5 h-5" />
6867
</button>
6968
<button
7069
onClick={() => setViewMode('full')}
@@ -75,7 +74,7 @@ function RouteComponent() {
7574
}`}
7675
title="Full cards"
7776
>
78-
<MdViewModule className="w-5 h-5" />
77+
<Grid2X2 className="w-5 h-5" />
7978
</button>
8079
<button
8180
onClick={() => setViewMode('row')}
@@ -86,7 +85,7 @@ function RouteComponent() {
8685
}`}
8786
title="Row cards"
8887
>
89-
<MdFormatListBulleted className="w-5 h-5" />
88+
<LayoutList className="w-5 h-5" />
9089
</button>
9190
</div>
9291
</div>

src/routes/_libraries/maintainers.tsx

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,7 @@ import { createFileRoute } from '@tanstack/react-router'
22
import { z } from 'zod'
33
import { useState } from 'react'
44
import * as React from 'react'
5-
import { X } from 'lucide-react'
6-
import {
7-
MdFilterList,
8-
MdViewList,
9-
MdViewModule,
10-
MdFormatListBulleted,
11-
} from 'react-icons/md'
5+
import { X, ListFilter, Grid2X2, Grid3X3, LayoutList } from 'lucide-react'
126
import { Footer } from '~/components/Footer'
137
import {
148
MaintainerCard,
@@ -25,7 +19,6 @@ import {
2519
getRoleForFilteredLibraries,
2620
} from '~/libraries/maintainers'
2721
import { Library, libraries } from '~/libraries'
28-
// import { fetchAllMaintainerStats } from '~/utils/docs'
2922

3023
const librarySchema = z.enum([
3124
'start',
@@ -64,26 +57,6 @@ export const Route = createFileRoute('/_libraries/maintainers')({
6457
keywords: 'tanstack,maintainers,contributors,open source,developers',
6558
}),
6659
}),
67-
// loader: async ({ context: { queryClient } }) => {
68-
// try {
69-
// // Fetch GitHub stats for all maintainers
70-
// const stats = await queryClient.ensureQueryData({
71-
// queryKey: ['maintainerStats'],
72-
// queryFn: () => fetchAllMaintainerStats(),
73-
// staleTime: 1000 * 60 * 30, // 30 minutes
74-
// })
75-
76-
// return {
77-
// stats,
78-
// }
79-
// } catch (error) {
80-
// console.error('Error loading maintainer stats:', error)
81-
// // Return empty stats array if there's an error
82-
// return {
83-
// stats: [],
84-
// }
85-
// }
86-
// },
8760
})
8861

8962
interface FilterProps {
@@ -174,7 +147,7 @@ function MaintainersFilter({
174147
}`}
175148
title="Compact cards"
176149
>
177-
<MdViewList className="w-5 h-5" />
150+
<Grid3X3 className="w-5 h-5" />
178151
</button>
179152
<button
180153
onClick={() => onViewModeChange('full')}
@@ -185,7 +158,7 @@ function MaintainersFilter({
185158
}`}
186159
title="Full cards"
187160
>
188-
<MdViewModule className="w-5 h-5" />
161+
<Grid2X2 className="w-5 h-5" />
189162
</button>
190163
<button
191164
onClick={() => onViewModeChange('row')}
@@ -196,7 +169,7 @@ function MaintainersFilter({
196169
}`}
197170
title="Row cards"
198171
>
199-
<MdFormatListBulleted className="w-5 h-5" />
172+
<LayoutList className="w-5 h-5" />
200173
</button>
201174
</div>
202175

@@ -206,7 +179,7 @@ function MaintainersFilter({
206179
onClick={() => setIsOpen(!isOpen)}
207180
className="inline-flex items-center gap-2 px-3 py-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
208181
>
209-
<MdFilterList className="w-4 h-4" />
182+
<ListFilter className="w-4 h-4" />
210183
Filter & Sort
211184
{hasFilters && (
212185
<span className="bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-0.5 rounded-full text-xs">

src/routes/_libraries/paid-support.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { createFileRoute, Link } from '@tanstack/react-router'
22
import { seo } from '~/utils/seo'
3-
import { MdViewList, MdViewModule, MdFormatListBulleted } from 'react-icons/md'
43
import { useState } from 'react'
54
import { coreMaintainers } from '~/libraries/maintainers'
65
import {
76
CompactMaintainerCard,
87
MaintainerCard,
98
MaintainerRowCard,
109
} from '~/components/MaintainerCard'
11-
import { Mail } from 'lucide-react'
10+
import { Grid2x2, Grid3X3, LayoutList, Mail } from 'lucide-react'
1211

1312
export const Route = createFileRoute('/_libraries/paid-support')({
1413
component: PaidSupportComp,
@@ -68,7 +67,7 @@ function PaidSupportComp() {
6867
}`}
6968
title="Compact cards"
7069
>
71-
<MdViewList className="w-5 h-5" />
70+
<Grid3X3 className="w-5 h-5" />
7271
</button>
7372
<button
7473
onClick={() => setViewMode('full')}
@@ -79,7 +78,7 @@ function PaidSupportComp() {
7978
}`}
8079
title="Full cards"
8180
>
82-
<MdViewModule className="w-5 h-5" />
81+
<Grid2x2 className="w-5 h-5" />
8382
</button>
8483
<button
8584
onClick={() => setViewMode('row')}
@@ -90,7 +89,7 @@ function PaidSupportComp() {
9089
}`}
9190
title="Row cards"
9291
>
93-
<MdFormatListBulleted className="w-5 h-5" />
92+
<LayoutList className="w-5 h-5" />
9493
</button>
9594
</div>
9695
</div>

src/routes/_libraries/partners.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { z } from 'zod'
66
import { Library } from '~/libraries'
77
import { useState } from 'react'
88
import * as React from 'react'
9-
import { X } from 'lucide-react'
10-
import { MdFilterList } from 'react-icons/md'
9+
import { ListFilter, X } from 'lucide-react'
1110
import { startProject } from '~/libraries/start'
1211
import { routerProject } from '~/libraries/router'
1312
import { queryProject } from '~/libraries/query'
@@ -135,7 +134,7 @@ function PartnersFilter({
135134
onClick={() => setIsOpen(!isOpen)}
136135
className="inline-flex items-center gap-2 px-3 py-2 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg text-sm font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
137136
>
138-
<MdFilterList className="w-4 h-4" />
137+
<ListFilter className="w-4 h-4" />
139138
Filter Partners
140139
{hasFilters && (
141140
<span className="bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-0.5 rounded-full text-xs">

0 commit comments

Comments
 (0)