Add icon select to manual trigger (#12724)

## After

<img width="1220" alt="image"
src="https://github.com/user-attachments/assets/98a73aae-80d7-4e92-93d3-be13210da88b"
/>

<img width="1131" alt="image"
src="https://github.com/user-attachments/assets/9919e415-4355-4995-8979-9055b821f1e9"
/>

<img width="1300" alt="image"
src="https://github.com/user-attachments/assets/27f11cb3-d72c-468a-a641-8414172b9b54"
/>

<img width="1353" alt="image"
src="https://github.com/user-attachments/assets/2f0037f2-fe17-48b6-b7e6-c7528687a5fd"
/>
This commit is contained in:
martmull
2025-06-19 18:32:42 +02:00
committed by GitHub
parent adcf6107e7
commit 28466ecbf3
17 changed files with 208 additions and 69 deletions

View File

@ -11,12 +11,10 @@ export const useIcons = () => {
return icons;
};
const getIcon = (iconKey?: string | null) => {
if (!iconKey) {
return defaultIcon;
}
return icons[iconKey] ?? defaultIcon;
const getIcon = (iconKey?: string | null, customDefaultIcon?: string) => {
return (
icons[iconKey ?? ''] || icons[customDefaultIcon ?? ''] || defaultIcon
);
};
return { getIcons, getIcon };

View File

@ -1,7 +1,9 @@
import { FunctionComponent } from 'react';
import * as React from 'react';
export type IconComponentProps = {
className?: string;
style?: React.CSSProperties;
size?: number | string;
stroke?: number | string;
color?: string;