Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

update tests

Jonathan Summers-Muir8a8e451de1e0
diff --git a/packages/ui/src/components/Button/Button.test.tsx b/packages/ui/src/components/Button/Button.test.tsx
index 93e88e8650c..c85f18d53fb 100644
--- a/packages/ui/src/components/Button/Button.test.tsx
+++ b/packages/ui/src/components/Button/Button.test.tsx
@@ -1,11 +1,11 @@
+import { fireEvent, render, screen } from '@testing-library/react'
+import Link from 'next/link'
import React from 'react'
-import { render, screen, fireEvent } from '@testing-library/react'
-import { Button, ButtonSize, ButtonType } from './Button'
import defaultTheme from '../../lib/theme/defaultTheme'
-import Link from 'next/link'
+import { Button } from './Button'
-const SIZES: ButtonSize[] = ['tiny', 'small', 'medium', 'large', 'xlarge']
-const TYPES: ButtonType[] = [
+const SIZES = ['tiny', 'small', 'medium', 'large', 'xlarge'] as const
+const TYPES = [
'primary',
'default',
'secondary',
@@ -16,7 +16,7 @@ const TYPES: ButtonType[] = [
'text',
'danger',
'warning',
-]
+] as const
describe('#Button', () => {
it('should render button correctly', () => {
diff --git a/packages/ui/src/components/Button/Button.tsx b/packages/ui/src/components/Button/Button.tsx
index ec1b69dade7..ee79aeb9dbf 100644
--- a/packages/ui/src/components/Button/Button.tsx
+++ b/packages/ui/src/components/Button/Button.tsx
@@ -1,13 +1,11 @@
-import * as React from 'react'
import { Slot } from '@radix-ui/react-slot'
import { VariantProps, cva } from 'class-variance-authority'
-
+import * as React from 'react'
+import { sizes } from './../../lib/commonCva'
+import { cn } from './../../lib/utils'
import { IconContext } from './../Icon/IconContext'
import { IconLoader } from './../Icon/icons/IconLoader'
-import { cn } from './../../lib/utils'
-import { sizes } from './../../lib/commonCva'
-
export type ButtonVariantProps = VariantProps<typeof buttonVariants>
const buttonVariants = cva(
`relative