Skip to content

Commit 1274c11

Browse files
committed
biome:fix
1 parent 49bc9b3 commit 1274c11

File tree

6 files changed

+39
-50
lines changed

6 files changed

+39
-50
lines changed
Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
1-
import * as React from "react"
2-
import { Slot } from "@radix-ui/react-slot"
3-
import { cva, type VariantProps } from "class-variance-authority"
1+
import { Slot } from '@radix-ui/react-slot'
2+
import { cva, type VariantProps } from 'class-variance-authority'
3+
import * as React from 'react'
44

5-
import { cn } from "@/lib/utils"
5+
import { cn } from '@/lib/utils'
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
8+
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
99
{
10+
defaultVariants: {
11+
size: 'default',
12+
variant: 'default',
13+
},
1014
variants: {
11-
variant: {
12-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
13-
destructive:
14-
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
15-
outline:
16-
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
17-
secondary:
18-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
19-
ghost: "hover:bg-accent hover:text-accent-foreground",
20-
link: "text-primary underline-offset-4 hover:underline",
21-
},
2215
size: {
23-
default: "h-10 px-4 py-2",
24-
sm: "h-9 rounded-md px-3",
25-
lg: "h-11 rounded-md px-8",
26-
icon: "h-10 w-10",
16+
default: 'h-10 px-4 py-2',
17+
icon: 'h-10 w-10',
18+
lg: 'h-11 rounded-md px-8',
19+
sm: 'h-9 rounded-md px-3',
20+
},
21+
variant: {
22+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
23+
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
24+
ghost: 'hover:bg-accent hover:text-accent-foreground',
25+
link: 'text-primary underline-offset-4 hover:underline',
26+
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
27+
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
2728
},
2829
},
29-
defaultVariants: {
30-
variant: "default",
31-
size: "default",
32-
},
33-
}
30+
},
3431
)
3532

3633
export interface ButtonProps
@@ -41,16 +38,12 @@ export interface ButtonProps
4138

4239
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
4340
({ className, variant, size, asChild = false, ...props }, ref) => {
44-
const Comp = asChild ? Slot : "button"
41+
const Comp = asChild ? Slot : 'button'
4542
return (
46-
<Comp
47-
className={cn(buttonVariants({ variant, size, className }))}
48-
ref={ref}
49-
{...props}
50-
/>
43+
<Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props} />
5144
)
52-
}
45+
},
5346
)
54-
Button.displayName = "Button"
47+
Button.displayName = 'Button'
5548

5649
export { Button, buttonVariants }

browser-extension/src/entrypoints/content.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { CONFIG, type ModeType } from '../lib/config'
2-
import type { CommentEvent, CommentSpot } from '../lib/enhancer'
3-
import { logger } from '../lib/logger'
4-
import { EnhancerRegistry, TextareaRegistry } from '../lib/registries'
5-
import { githubPrNewCommentContentScript } from '../playgrounds/github-playground'
1+
import { CONFIG, type ModeType } from '@/lib/config'
2+
import type { CommentEvent, CommentSpot } from '@/lib/enhancer'
3+
import { logger } from '@/lib/logger'
4+
import { EnhancerRegistry, TextareaRegistry } from '@/lib/registries'
5+
import { githubPrNewCommentContentScript } from '@/playgrounds/github-playground'
66

77
const enhancers = new EnhancerRegistry()
88
const enhancedTextareas = new TextareaRegistry()

browser-extension/src/entrypoints/popup/main.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,11 @@ import {
99
TableHeader,
1010
TableRow,
1111
} from '@/components/ui/table'
12-
import { cn } from '@/lib/utils'
12+
import type { CommentState } from '@/entrypoints/background'
1313
import { logger } from '@/lib/logger'
14-
import type {
15-
GetOpenSpotsMessage,
16-
GetOpenSpotsResponse,
17-
SwitchToTabMessage,
18-
} from '@/lib/messages'
14+
import type { GetOpenSpotsMessage, GetOpenSpotsResponse, SwitchToTabMessage } from '@/lib/messages'
1915
import { EnhancerRegistry } from '@/lib/registries'
20-
import type { CommentState } from '@/entrypoints/background'
16+
import { cn } from '@/lib/utils'
2117

2218
const enhancers = new EnhancerRegistry()
2319

browser-extension/src/lib/enhancers/github/githubIssueAddComment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import OverType, { type OverTypeInstance } from 'overtype'
22
import type React from 'react'
3-
import type { CommentEnhancer, CommentSpot } from '../../enhancer'
4-
import { logger } from '../../logger'
3+
import type { CommentEnhancer, CommentSpot } from '@/lib/enhancer'
4+
import { logger } from '@/lib/logger'
55
import { modifyDOM } from '../modifyDOM'
66
import { githubHighlighter } from './githubHighlighter'
77

browser-extension/src/lib/enhancers/github/githubPRAddComment.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import OverType, { type OverTypeInstance } from 'overtype'
22
import type React from 'react'
3-
import type { CommentEnhancer, CommentSpot } from '../../enhancer'
4-
import { logger } from '../../logger'
3+
import type { CommentEnhancer, CommentSpot } from '@/lib/enhancer'
4+
import { logger } from '@/lib/logger'
55
import { modifyDOM } from '../modifyDOM'
66
import { githubHighlighter } from './githubHighlighter'
77

browser-extension/src/styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@
6666
body {
6767
@apply bg-background text-foreground;
6868
}
69-
}
69+
}

0 commit comments

Comments
 (0)