Skip to content

Commit 20d4d0e

Browse files
committed
🐛 FIX: Format
1 parent 4364743 commit 20d4d0e

6 files changed

Lines changed: 77 additions & 75 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
We welcome contributions to this project.
44

5-
65
## Releasing a new version
76

87
```bash
98
pnpm changeset
109
pnpm version-packages
10+
pnpm clean-examples
1111
pnpm release
1212
```

examples/nextjs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-opti
2424

2525
To learn more about Next.js, take a look at the following resources:
2626

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
2929

3030
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
3131

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
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 * as React from 'react';
2+
import {Slot} from '@radix-ui/react-slot';
3+
import {cva, type VariantProps} from 'class-variance-authority';
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 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",
9-
{
10-
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-
},
22-
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",
27-
},
28-
},
29-
defaultVariants: {
30-
variant: "default",
31-
size: "default",
32-
},
33-
}
34-
)
8+
'inline-flex items-center justify-center 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',
9+
{
10+
variants: {
11+
variant: {
12+
default:
13+
'bg-primary text-primary-foreground hover:bg-primary/90',
14+
destructive:
15+
'bg-destructive text-destructive-foreground hover:bg-destructive/90',
16+
outline:
17+
'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
18+
secondary:
19+
'bg-secondary text-secondary-foreground hover:bg-secondary/80',
20+
ghost: 'hover:bg-accent hover:text-accent-foreground',
21+
link: 'text-primary underline-offset-4 hover:underline',
22+
},
23+
size: {
24+
default: 'h-10 px-4 py-2',
25+
sm: 'h-9 rounded-md px-3',
26+
lg: 'h-11 rounded-md px-8',
27+
icon: 'h-10 w-10',
28+
},
29+
},
30+
defaultVariants: {
31+
variant: 'default',
32+
size: 'default',
33+
},
34+
},
35+
);
3536

3637
export interface ButtonProps
37-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
38-
VariantProps<typeof buttonVariants> {
39-
asChild?: boolean
38+
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
39+
VariantProps<typeof buttonVariants> {
40+
asChild?: boolean;
4041
}
4142

4243
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
43-
({ className, variant, size, asChild = false, ...props }, ref) => {
44-
const Comp = asChild ? Slot : "button"
45-
return (
46-
<Comp
47-
className={cn(buttonVariants({ variant, size, className }))}
48-
ref={ref}
49-
{...props}
50-
/>
51-
)
52-
}
53-
)
54-
Button.displayName = "Button"
44+
({className, variant, size, asChild = false, ...props}, ref) => {
45+
const Comp = asChild ? Slot : 'button';
46+
return (
47+
<Comp
48+
className={cn(buttonVariants({variant, size, className}))}
49+
ref={ref}
50+
{...props}
51+
/>
52+
);
53+
},
54+
);
55+
Button.displayName = 'Button';
5556

56-
export { Button, buttonVariants }
57+
export {Button, buttonVariants};
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import * as React from "react"
1+
import * as React from 'react';
22

3-
import { cn } from "@/lib/utils"
3+
import {cn} from '@/lib/utils';
44

55
export interface InputProps
6-
extends React.InputHTMLAttributes<HTMLInputElement> {}
6+
extends React.InputHTMLAttributes<HTMLInputElement> {}
77

88
const Input = React.forwardRef<HTMLInputElement, InputProps>(
9-
({ className, type, ...props }, ref) => {
10-
return (
11-
<input
12-
type={type}
13-
className={cn(
14-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
15-
className
16-
)}
17-
ref={ref}
18-
{...props}
19-
/>
20-
)
21-
}
22-
)
23-
Input.displayName = "Input"
9+
({className, type, ...props}, ref) => {
10+
return (
11+
<input
12+
type={type}
13+
className={cn(
14+
'flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',
15+
className,
16+
)}
17+
ref={ref}
18+
{...props}
19+
/>
20+
);
21+
},
22+
);
23+
Input.displayName = 'Input';
2424

25-
export { Input }
25+
export {Input};

examples/nextjs/lib/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { type ClassValue, clsx } from "clsx"
2-
import { twMerge } from "tailwind-merge"
1+
import {type ClassValue, clsx} from 'clsx';
2+
import {twMerge} from 'tailwind-merge';
33

44
export function cn(...inputs: ClassValue[]) {
5-
return twMerge(clsx(inputs))
5+
return twMerge(clsx(inputs));
66
}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@
1111
"changeset": "changeset",
1212
"publint": "turbo publint",
1313
"type-check": "turbo type-check",
14-
"version-packages": "changeset version && node .github/scripts/cleanup-examples-changesets.mjs && pnpm install --no-frozen-lockfile",
15-
"clean": "turbo clean && rm -rf node_modules",
14+
"version-packages": "changeset version",
15+
"clean": "turbo clean",
16+
"xclean": "turbo clean && rm -rf node_modules",
1617
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
17-
"release": "turbo build && changeset publish",
18+
"release": "turbo clean && turbo build && changeset publish",
1819
"releaseDocs": "turbo build --filter=docs^... && changeset publish",
1920
"releasex": "turbo build && changeset publish",
2021
"prettier-check": "prettier --check \"**/*.{js,ts,tsx,md,mdx}\"",

0 commit comments

Comments
 (0)