@@ -74,6 +74,12 @@ const StyledSearchIcon = styled(SearchIcon)`
74
74
const IconListWrapper = styled . div `
75
75
padding-left: 10px;
76
76
padding-right: 4px;
77
+ .gtujLP {
78
+ overflow: hidden;
79
+ }
80
+ .iconsDiv div {
81
+ float: left;
82
+ }
77
83
` ;
78
84
const IconList = styled ( List ) `
79
85
scrollbar-gutter: stable;
@@ -278,14 +284,10 @@ function getIconKey(value?: string) {
278
284
}
279
285
280
286
export function useShape ( value ?: string ) {
281
- console . log ( "icon value " , value ) ;
282
287
const key = getIconKey ( value ) ;
283
- console . log ( "icon key " , key ) ;
284
-
285
288
const [ icon , setIcon ] = useState < Icon | undefined > ( undefined ) ;
286
289
useEffect ( ( ) => {
287
290
let allshapes = getAllIcons ( ) ;
288
- console . log ( "all shapes " , allshapes ) ;
289
291
setIcon ( allshapes [ key ] ) ;
290
292
} , [ key ] ) ;
291
293
return icon ;
@@ -379,28 +381,36 @@ const IconPopup = (props: {
379
381
< StyledCloseIcon onClick = { props . onClose } />
380
382
</ TitleDiv >
381
383
{ /* <SearchDiv>
382
- <TacoInput
384
+ <TacoInput
383
385
style={{ width: "100%", paddingLeft: "40px" }}
384
386
value={searchText}
385
387
onChange={(e) => setSearchText(e.target.value)}
386
388
placeholder={trans("shapeSelect.searchPlaceholder")}
387
389
/>
388
390
<StyledSearchIcon />
389
391
</SearchDiv> */ }
390
- < IconListWrapper >
392
+ < IconListWrapper style = { { display : "flex" , flexWrap : "wrap" } } >
391
393
< >
392
394
{ Object . keys ( shapes ) . map ( ( shapeType : string , _i : number ) => {
393
395
return shapes [ shapeType as keyof typeof shapes ] . map (
394
396
( Shape : any , index : any ) => {
395
397
return (
396
- < Shape
397
- size = { 48 }
398
+ < div
399
+ style = { { paddingLeft : "10px" } }
398
400
key = { index }
399
401
onClick = { ( ) => {
400
- console . log ( "Shape " , index , shapeType ) ;
401
402
onChangeIcon ( index + "_" + shapeType ) ;
402
403
} }
403
- />
404
+ >
405
+ < Shape
406
+ size = { 24 }
407
+ key = { index }
408
+ onClick = { ( ) => {
409
+ onChangeIcon ( index + "_" + shapeType ) ;
410
+ } }
411
+ />
412
+ < p > { shapeType } </ p >
413
+ </ div >
404
414
) ;
405
415
}
406
416
) ;
0 commit comments