Skip to content

Commit

Permalink
fix(ci): fix icons-react ci (ant-design#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
cc-hearts authored Oct 26, 2023
1 parent a8b4733 commit d7c5ad5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/icons-react/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { updateCSS } from 'rc-util/lib/Dom/dynamicCSS';
import { getShadowRoot } from 'rc-util/lib/Dom/shadow';
import warn from 'rc-util/lib/warning';
import React, { useContext, useEffect } from 'react';
import type { CSSProperties, MouseEventHandler, MutableRefObject, ReactNode } from 'react'
import IconContext from './components/Context';

function camelCase(input: string) {
Expand Down Expand Up @@ -40,11 +41,17 @@ export function normalizeAttrs(attrs: Attrs = {}): Attrs {
}

export type Attrs = Record<string, string>;
interface RootProps {
onClick: MouseEventHandler<Element>;
style: CSSProperties;
ref: MutableRefObject<any>
[props: string]: string | number | ReactNode | MouseEventHandler<Element> | CSSProperties | MutableRefObject<any>
}

export function generate(
node: AbstractNode,
key: string,
rootProps?: Record<string, string> | false,
rootProps?: RootProps | false,
): any {
if (!rootProps) {
return React.createElement(
Expand Down

0 comments on commit d7c5ad5

Please sign in to comment.