Skip to content

Commit

Permalink
fix: fix command item types (#4106)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahgm authored Aug 13, 2024
1 parent fcf8ddf commit e8cd153
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/app/_components/CommandItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ interface CommandItemProps {
}

interface ChangeThemeItemProps extends CommandItemProps {
setOpen: Dispatch;
setOpen: Dispatch<SetStateAction<boolean>>;
}
interface PagesItemProps extends CommandItemProps {
name: string;
setOpen: Dispatch;
setPages: Dispatch;
setOpen: Dispatch<SetStateAction<boolean>>;
setPages: Dispatch<SetStateAction<[]>>;
subPage: string;
items: {
title: string;
Expand Down Expand Up @@ -106,7 +106,7 @@ export const TokenItem = ({ classNames }: CommandItemProps) => {

export const IconItem = ({ classNames }: CommandItemProps) => {
const ref = useRef<SVGSVGElement>();
const getIcon = (icon: keyof typeof Icons, ref: RefObject) => {
const getIcon = (icon: keyof typeof Icons, ref: RefObject<SVGSVGElement>) => {
const Component = Icons[icon];
const iconElement = <Component ref={ref} />;
const svg = ReactDOMServer.renderToString(<Component ref={ref} />);
Expand Down

0 comments on commit e8cd153

Please sign in to comment.