Skip to content

Commit 2b6dbc7

Browse files
committed
fix format
1 parent 4f46ffe commit 2b6dbc7

File tree

7 files changed

+43
-47
lines changed

7 files changed

+43
-47
lines changed

src/components/FormFields.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const errorStyle = {
1010
}
1111

1212
function getNumericValidationFor<
13-
TKey extends "maxLength" | "minLength" | "min" | "max",
13+
TKey extends "maxLength" | "minLength" | "min" | "max"
1414
>(name: TKey, value: string): Record<TKey, number> | null {
1515
const number = parseInt(value, 10)
1616
if (typeof number === "number" && !Number.isNaN(number)) {

src/components/Nav.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ export default function Nav() {
236236
<span>{nav.advanced}</span>
237237
</Link>
238238
<Link
239-
className={`desktopOnly ${router.asPath == "/faqs" ? "active" : ""}`}
239+
className={`desktopOnly ${
240+
router.asPath == "/faqs" ? "active" : ""
241+
}`}
240242
href="/faqs"
241243
>
242244
<div className={styles.iconWrapper}>

src/components/ResourceList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ export default function ResourceList({
3535
const { title, author, description, version } = cur
3636
// case insensitive filter
3737
if (
38-
`${title} ${author ?? ""} ${description ?? ""} ${version ? `v${version}` : ""}`.match(
39-
new RegExp(watch("filterResources"), "i")
40-
)
38+
`${title} ${author ?? ""} ${description ?? ""} ${
39+
version ? `v${version}` : ""
40+
}`.match(new RegExp(watch("filterResources"), "i"))
4141
) {
4242
acc.push(cur)
4343
}

src/components/Watcher.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,20 @@ const Watcher = ({ isPlayWatch }: { isPlayWatch: boolean }) => {
7474
i === 13
7575
? "W"
7676
: i === 14
77-
? "Wa"
78-
: i === 15
79-
? "Wat"
80-
: i === 16
81-
? "Watc"
82-
: i === 17
83-
? "Watch"
84-
: i === 18
85-
? "Watchi"
86-
: i === 19
87-
? "Watchin"
88-
: i === 20
89-
? "Watching"
90-
: "Watching."
77+
? "Wa"
78+
: i === 15
79+
? "Wat"
80+
: i === 16
81+
? "Watc"
82+
: i === 17
83+
? "Watch"
84+
: i === 18
85+
? "Watchi"
86+
: i === 19
87+
? "Watchin"
88+
: i === 20
89+
? "Watching"
90+
: "Watching."
9191
)
9292
}
9393

src/components/layout.css

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -523,17 +523,11 @@ a.skip-main:active {
523523
width: 1px;
524524
height: 1px;
525525
border: 1px solid transparent;
526-
box-shadow:
527-
-2px 0 0 -1px currentColor,
528-
2px 0 0 -1px currentColor,
529-
0 -2px 0 -1px currentColor,
530-
0 2px 0 -1px currentColor,
531-
-6px 0 0 -1px currentColor,
532-
6px 0 0 -1px currentColor,
533-
-4px -2px 0 -1px currentColor,
534-
-4px 2px 0 -1px currentColor,
535-
4px -2px 0 -1px currentColor,
536-
4px 2px 0 -1px currentColor;
526+
box-shadow: -2px 0 0 -1px currentColor, 2px 0 0 -1px currentColor,
527+
0 -2px 0 -1px currentColor, 0 2px 0 -1px currentColor,
528+
-6px 0 0 -1px currentColor, 6px 0 0 -1px currentColor,
529+
-4px -2px 0 -1px currentColor, -4px 2px 0 -1px currentColor,
530+
4px -2px 0 -1px currentColor, 4px 2px 0 -1px currentColor;
537531
}
538532

539533
.keyboard.icon:after {

src/content/docs/createFormControl.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ This function create the entire form state subscription and allow you to subscri
1212

1313
This following table applied to `FormProvider`, `useFormContext` accepts no argument.
1414

15-
| Name | Type | Description |
16-
| ---------- | --------------------------- | ---------------------------------------------- |
15+
| Name | Type | Description |
16+
| ---------- | --------------------------- | -------------- |
1717
| `...props` | <TypeText>Object</TypeText> | `UseFormProps` |
1818

1919
<Admonition type="important" title="Notes">
20-
- This function is published at **v7.55.0-next.1**
21-
- This function is completely optional, you can consider to use this instead of `useFormContext` API.
22-
- You may find it useful if you would like to subscribe formsState by skipping react re-render.
20+
- This function is published at **v7.55.0-next.1** - This function is
21+
completely optional, you can consider to use this instead of `useFormContext`
22+
API. - You may find it useful if you would like to subscribe formsState by
23+
skipping react re-render.
2324
</Admonition>
2425

2526
**Examples:**
@@ -72,7 +73,7 @@ formControl.subscribe({
7273
if (formState.isDirty) {
7374
// do something here
7475
}
75-
}
76+
},
7677
})
7778

7879
function App() {
@@ -83,4 +84,5 @@ function App() {
8384
return <form />
8485
}
8586
```
87+
8688
</TabGroup>

src/content/ts.mdx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default function App() {
130130
export type UseFormReturn<
131131
TFieldValues extends FieldValues = FieldValues,
132132
TContext = any,
133-
TTransformedValues extends FieldValues | undefined = undefined,
133+
TTransformedValues extends FieldValues | undefined = undefined
134134
> = {
135135
watch: UseFormWatch<TFieldValues>
136136
getValues: UseFormGetValues<TFieldValues>
@@ -240,7 +240,7 @@ export default function App() {
240240
export type UseFormProps<
241241
TFieldValues extends FieldValues = FieldValues,
242242
TContext extends object = object,
243-
TTransformedValues extends FieldValues | undefined = undefined,
243+
TTransformedValues extends FieldValues | undefined = undefined
244244
> = Partial<{
245245
mode: Mode
246246
disabled: boolean
@@ -267,9 +267,8 @@ export type UseFormProps<
267267
```typescript copy
268268
export type UseFieldArrayReturn<
269269
TFieldValues extends FieldValues = FieldValues,
270-
TFieldArrayName extends
271-
FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>,
272-
TKeyName extends string = "id",
270+
TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>,
271+
TKeyName extends string = "id"
273272
> = {
274273
swap: UseFieldArraySwap
275274
move: UseFieldArrayMove
@@ -318,7 +317,7 @@ export type UseFieldArrayProps<
318317
```typescript copy
319318
export type UseControllerReturn<
320319
TFieldValues extends FieldValues = FieldValues,
321-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
320+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
322321
> = {
323322
field: ControllerRenderProps<TFieldValues, TName>
324323
formState: UseFormStateReturn<TFieldValues>
@@ -333,7 +332,7 @@ export type UseControllerReturn<
333332
```typescript copy
334333
export type UseControllerProps<
335334
TFieldValues extends FieldValues = FieldValues,
336-
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
335+
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
337336
> = {
338337
name: TName
339338
rules?: Omit<
@@ -432,9 +431,8 @@ export type FieldValues = Record<string, any>
432431
```typescript copy
433432
export type FieldArrayWithId<
434433
TFieldValues extends FieldValues = FieldValues,
435-
TFieldArrayName extends
436-
FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>,
437-
TKeyName extends string = "id",
434+
TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>,
435+
TKeyName extends string = "id"
438436
> = FieldArray<TFieldValues, TFieldArrayName> & Record<TKeyName, string>
439437
```
440438
@@ -455,7 +453,7 @@ export type Mode = keyof ValidationMode
455453
```typescript copy
456454
export type RegisterOptions<
457455
TFieldValues extends FieldValues = FieldValues,
458-
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
456+
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
459457
> = Partial<{
460458
required: Message | ValidationRule<boolean>
461459
min: ValidationRule<number | string>

0 commit comments

Comments
 (0)