Skip to content

Commit

Permalink
always import react
Browse files Browse the repository at this point in the history
  • Loading branch information
oBusk committed May 3, 2023
1 parent ee44310 commit 88527f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/ui/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Slot } from "@radix-ui/react-slot";
import * as React from "react";
import { ButtonHTMLAttributes, forwardRef } from "react";
import { cva, VariantProps } from "^/lib/cva";

export const buttonVariants = cva(
Expand Down Expand Up @@ -33,12 +33,12 @@ export const buttonVariants = cva(
);

export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
extends ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
const Button = forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/Stack.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { forwardRef } from "react";
import { forwardRef, HTMLAttributes } from "react";
import { cva, VariantProps } from "^/lib/cva";

const stackVariants = cva("flex", {
Expand Down Expand Up @@ -30,7 +30,7 @@ const stackVariants = cva("flex", {
});

export interface StackProps
extends React.HTMLAttributes<HTMLElement>,
extends HTMLAttributes<HTMLElement>,
VariantProps<typeof stackVariants> {}

const Stack = forwardRef<HTMLElement, StackProps>(
Expand Down

0 comments on commit 88527f0

Please sign in to comment.