Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit 68eb754

Browse files
committed
docs: Small adjustments on guides
1 parent 6b56832 commit 68eb754

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

docs/src/docs/examples/checkbox.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default CheckboxInput;
7272

7373
## Usage example
7474

75-
```jsx lineNumbers=true
75+
```tsx lineNumbers=true
7676
import React, { useRef } from 'react';
7777
import { FormHandles } from '@unform/core';
7878
import { Form } from '@unform/web';

docs/src/docs/recipes/typescript.mdx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import Input from './components/Input';
2323
interface FormData {
2424
name: string;
2525
email: string;
26-
};
26+
}
2727

2828
const MyForm: React.FC = () => {
2929
const formRef = useRef<FormHandles>(null);
3030

31-
const handleSubmit: SubmitHandler<FormData> = (data) => {
31+
const handleSubmit: SubmitHandler<FormData> = data => {
3232
console.log(formRef);
3333
};
3434

@@ -37,7 +37,7 @@ const MyForm: React.FC = () => {
3737
<Input name="name" />
3838
<Input name="email" />
3939
</Form>
40-
)
40+
);
4141
};
4242

4343
export default MyForm;
@@ -47,17 +47,15 @@ export default MyForm;
4747

4848
When creating a simple HTML input or any other HTML element used for input source, remember to always extend the element props. In web you can always use the `JSX.IntrinsicElements['element']` to get the props adapted to JSX.
4949

50-
<blockquote>
51-
<p>In React Native you can import default component props directly from `react-native` package, for example:</p>
50+
In React Native you can import default component props directly from `react-native` package, for example:
5251

5352
```jsx
54-
import { TextInputProps } from 'react-native'`
53+
import { TextInputProps } from 'react-native';
5554
```
56-
</blockquote>
5755

5856
Also, in web (ReactJS) remember to reference the global element inside `useRef` hook and **always** set the default value to `null`.
5957

60-
```jsx lineNumbers=true
58+
```jsx lineNumbers
6159
import React, { useEffect, useRef } from 'react';
6260
import { useField } from '@unform/core';
6361

0 commit comments

Comments
 (0)