Skip to content

Commit

Permalink
type 에러를 해결했다
Browse files Browse the repository at this point in the history
  • Loading branch information
healtheloper committed Aug 14, 2023
1 parent 706ba3c commit 09da67f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/co-design-core/src/components/Anchor/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface _SharedTextProps extends SharedTextProps {

export type AnchorProps<C extends React.ElementType> = PolymorphicComponentProps<C, _SharedTextProps>;

type AnchorComponent = <C extends React.ElementType = 'a'>(props: AnchorProps<C>) => React.ReactElement;
type AnchorComponent = <C extends React.ElementType = 'a'>(props: AnchorProps<C>) => React.ReactNode;

export const Anchor: AnchorComponent & { displayName?: string } = forwardRef(
<C extends React.ElementType = 'a'>(
Expand Down
2 changes: 1 addition & 1 deletion packages/co-design-core/src/components/Text/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface SharedTextProps extends CoComponentProps<TextStylesNames> {

export type TextProps<C extends React.ElementType> = PolymorphicComponentProps<C, SharedTextProps>;

type TextComponent = <C extends React.ElementType = 'span'>(props: TextProps<C>) => React.ReactElement;
type TextComponent = <C extends React.ElementType = 'span'>(props: TextProps<C>) => React.ReactNode;

export const Text: TextComponent & { displayName?: string } = forwardRef(
<C extends React.ElementType = 'span'>(
Expand Down

0 comments on commit 09da67f

Please sign in to comment.