Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Feb 20, 2024
1 parent cbad3b1 commit 59456bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 3 additions & 4 deletions code/ui/blocks/src/components/ArgsTable/ArgControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ import {
RangeControl,
TextControl,
} from '../../controls';
import type { Args } from './types';
import type { InputType } from '@storybook/types';
import type { Args, ArgType } from './types';

export interface ArgControlProps {
row: InputType;
row: ArgType;
arg: any;
updateArgs: (args: Args) => void;
isHovered: boolean;
Expand Down Expand Up @@ -66,7 +65,7 @@ export const ArgControl: FC<ArgControlProps> = ({ row, arg, updateArgs, isHovere
const onBlur = useCallback(() => setFocused(false), []);
const onFocus = useCallback(() => setFocused(true), []);

if (!control && row.type !== 'function')
if (!control && row.type?.name !== 'function')
return isHovered ? (
<Link
href="https://storybook.js.org/docs/react/essentials/controls"
Expand Down
3 changes: 3 additions & 0 deletions code/ui/blocks/src/components/ArgsTable/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export interface ArgType {
description?: string;
defaultValue?: any;
if?: Conditional;
type?: {
name?: string;
};
[key: string]: any;
}

Expand Down

0 comments on commit 59456bf

Please sign in to comment.