MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / IconLibrary

Function IconLibrary

plugins/icon-library/icon-library.tsx:47–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47const IconLibrary = () => {
48 const [iconClasses, setIconClasses] = useState("")
49 return (
50 <div className="flex flex-col gap-4 p-2">
51 <div className="flex items-center justify-end gap-2">
52 <label className="text-white">Icon classes:</label>
53 <input
54 placeholder="Optional classes to apply to icons"
55 className=" w-full rounded-md !text-gray-800 bg-gray-100 !p-2 dark:bg-gray-800 dark:!text-gray-100 md:w-1/2 xl:w-1/3"
56 value={iconClasses}
57 onChange={(e) => setIconClasses(e.target.value)}
58 />
59 </div>
60 <div className="grid grid-cols-4 place-items-center justify-items-stretch gap-4 rounded-md !border !border-gray-600 p-2 md:grid-cols-6 xl:grid-cols-8">
61 {iconNames.map((key) => {
62 return (
63 <div key={key} className="inline-flex flex-col items-center justify-center overflow-hidden">
64 <div className="mb-2 w-full truncate text-center">{key}</div>
65 <div className="flex items-center gap-2">
66 <ClickableIcon className={iconClasses} size="sm" name={key} />
67 <ClickableIcon className={iconClasses} size="md" name={key} />
68 <ClickableIcon className={iconClasses} size="lg" name={key} />
69 <ClickableIcon className={iconClasses} size="xl" name={key} />
70 </div>
71 </div>
72 )
73 })}
74 </div>
75 </div>
76 )
77}
78
79// Export plugin as a function that returns TanStack plugin configuration
80export const iconLibraryPlugin = ({

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…