11import { selectBricksIntegrator , setBricksIntegrator } from "@/src/reduxStore/states/general" ;
22import { IntegratorPage , PageSearchProps } from "@/src/types/shared/bricks-integrator" ;
3- import { IconAlertCircle , IconBrandGithub , IconChevronsDown , IconLoader , IconSearch } from "@tabler/icons-react" ;
3+ import { IconAlertCircle , IconBrandGithub , IconChevronsDown , IconSearch } from "@tabler/icons-react" ;
44import { useDispatch , useSelector } from "react-redux"
55import LoadingIcon from "../loading/LoadingIcon" ;
66import { useState } from "react" ;
77import style from '@/src/styles/shared/bricks-integrator.module.css' ;
88import { jsonCopy } from "@/submodules/javascript-functions/general" ;
9- import * as TablerIcons from '@tabler/icons-react' ;
10- import { getIconName } from "@/src/util/shared/bricks-integrator-helper" ;
11-
129export default function PageSearch ( props : PageSearchProps ) {
1310 const dispatch = useDispatch ( ) ;
1411
@@ -72,7 +69,6 @@ export default function PageSearch(props: PageSearchProps) {
7269 { config . search . results . map ( ( result : any , i : number ) => (
7370 < li key = { result . id } onClick = { ( ) => props . selectSearchResult ( result . id ) }
7471 className = { `text-left group flex flex-row items-center cursor-pointer select-none rounded-xl p-3 hover:bg-gray-100 relative ${ ! result . searchVisible || ! result . groupVisible ? 'hidden' : '' } ` } id = "option-1" role = "option" >
75- < SVGIcon icon = { result . attributes . tablerIcon } size = { 24 } strokeWidth = { 2 } color = { "black" } />
7672 < div className = "ml-2 flex-auto" >
7773 < p className = "text-sm font-semibold text-gray-700" > { result . attributes . name } </ p >
7874 < p className = "text-sm text-gray-500" > { result . attributes . description } </ p >
@@ -83,27 +79,3 @@ export default function PageSearch(props: PageSearchProps) {
8379 </ div > }
8480 </ > )
8581}
86-
87- function SVGIcon ( { icon, size, strokeWidth, color } ) {
88- const Icon = TablerIcons [ 'Icon' + icon ] ;
89- if ( Icon ) {
90- return (
91- < Icon
92- size = { size }
93- strokeWidth = { strokeWidth }
94- color = { color }
95- />
96- )
97- } else {
98- const Icon = TablerIcons [ 'Icon' + getIconName ( icon ) ] ;
99- if ( Icon ) {
100- return (
101- < Icon
102- size = { size }
103- strokeWidth = { strokeWidth }
104- color = { color }
105- />
106- )
107- }
108- }
109- }
0 commit comments