diff --git a/semcore/data-table/src/components/Head/Column.tsx b/semcore/data-table/src/components/Head/Column.tsx index 2fbce0af28..274902617f 100644 --- a/semcore/data-table/src/components/Head/Column.tsx +++ b/semcore/data-table/src/components/Head/Column.tsx @@ -17,7 +17,7 @@ import { handleFocusCell, handleKeydownFocusCell } from '../../enhancers/focusab import type { ROW_GROUP } from '../DataTable/DataTable'; import type { DataTableData, SortDirection } from '../DataTable/DataTable.types'; -const SORTING_ICON: { [key in SortDirection]: React.FC> } = { +const SORTING_ICON: { [key in SortDirection]: typeof SortAsc | typeof SortDesc } = { desc: SortDesc, asc: SortAsc, } as const; diff --git a/semcore/icon/src/Icon.tsx b/semcore/icon/src/Icon.tsx index ac7ff4f82f..28fd04cae0 100644 --- a/semcore/icon/src/Icon.tsx +++ b/semcore/icon/src/Icon.tsx @@ -124,6 +124,6 @@ function Icon({ ); } -type IconComponent = Intergalactic.Component<'svg', IconProps>; +export type IconComponent = Intergalactic.Component<'svg', IconProps>; export default createBaseComponent(Icon, { isIcon: true }); diff --git a/semcore/icon/src/index.ts b/semcore/icon/src/index.ts index 692802828f..45d2200aa2 100644 --- a/semcore/icon/src/index.ts +++ b/semcore/icon/src/index.ts @@ -1,7 +1,8 @@ -import type { IconProps } from './Icon'; +import type { IconProps, IconComponent } from './Icon'; export { default } from './Icon'; export type { + IconComponent, IconProps, }; diff --git a/semcore/icon/transform-svg-icon.ts b/semcore/icon/transform-svg-icon.ts index bfd108a436..27c9ca171f 100644 --- a/semcore/icon/transform-svg-icon.ts +++ b/semcore/icon/transform-svg-icon.ts @@ -48,8 +48,8 @@ async function transform() { await fs.mkdir(writeBasePath, { recursive: true }); const dts = ` -import type { IconProps } from '../..${(type === 'pay' || type === 'color') ? '/../' : '/'}types/index.mjs'; -declare const Icon: React.FC & IconProps>; +import type { IconComponent } from '../..${(type === 'pay' || type === 'color') ? '/../' : '/'}types'; +declare const Icon: IconComponent; export default Icon; `; diff --git a/semcore/modal/src/Modal.tsx b/semcore/modal/src/Modal.tsx index b13a4e44b7..63747297b3 100644 --- a/semcore/modal/src/Modal.tsx +++ b/semcore/modal/src/Modal.tsx @@ -222,7 +222,7 @@ function Close( ) : ( - + )} ,