Skip to content

Commit

Permalink
fix: replace deprecated types
Browse files Browse the repository at this point in the history
  • Loading branch information
timhettler committed Feb 4, 2025
1 parent 95a484a commit c616def
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type CardContextValue = {
const [CardProvider, useCardContext] =
createCardContext<CardContextValue>(CARD_NAME);

type CardElement = React.ElementRef<typeof Primitive.div>;
type CardElement = React.ComponentRef<typeof Primitive.div>;
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
interface CardProps extends PrimitiveDivProps {}

Expand Down Expand Up @@ -82,7 +82,7 @@ Card.displayName = CARD_NAME;

const TARGET_NAME = "CardTarget";

type CardTargetElement = React.ElementRef<typeof Primitive.a>;
type CardTargetElement = React.ComponentRef<typeof Primitive.a>;
type PrimitiveAnchorProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;
interface CardTargetProps extends PrimitiveAnchorProps {}

Expand Down Expand Up @@ -110,7 +110,7 @@ CardTarget.displayName = TARGET_NAME;

const TARGET_DESCRIPTION_NAME = "CardTargetDescription";

type CardTargetDescriptionElement = React.ElementRef<typeof Primitive.span>;
type CardTargetDescriptionElement = React.ComponentRef<typeof Primitive.span>;
interface CardTargetDescriptionProps extends PrimitiveDivProps {}

const CardTargetDescription = React.forwardRef<
Expand Down Expand Up @@ -140,7 +140,7 @@ CardTargetDescription.displayName = TARGET_DESCRIPTION_NAME;

const EXCLUDE_NAME = "CardExclude";

type CardExcludeElement = React.ElementRef<typeof Primitive.div>;
type CardExcludeElement = React.ComponentRef<typeof Primitive.div>;
interface CardExcludeProps extends PrimitiveDivProps {}

const CardExclude = React.forwardRef<CardExcludeElement, CardExcludeProps>(
Expand Down

0 comments on commit c616def

Please sign in to comment.