Skip to content

Commit 574881c

Browse files
committed
Disabled jsx-a11y warning
1 parent 2133eb6 commit 574881c

File tree

1 file changed

+29
-23
lines changed
  • examples/strongly-typed-values-typescript

1 file changed

+29
-23
lines changed

examples/strongly-typed-values-typescript/index.tsx

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
import React from "react";
2-
import { render } from "react-dom";
3-
import Styles from "./Styles";
4-
import { Form, Field } from "react-final-form";
5-
import CheckboxInput from "./components/CheckboxInput";
6-
import RadioInput from "./components/RadioInput";
7-
import TextInput from "./components/TextInput";
8-
import NumberInput from "./components/NumberInput";
9-
import TextAreaInput from "./components/TextAreaInput";
10-
import SelectInput from "./components/SelectInput";
11-
import MultiSelectInput from "./components/MultiSelectInput";
12-
import MultiCheckboxInput from "./components/MultiCheckboxInput";
1+
/* eslint-disable jsx-a11y/accessible-emoji */
2+
import React from 'react';
3+
import { render } from 'react-dom';
4+
import Styles from './Styles';
5+
import { Form, Field } from 'react-final-form';
6+
import CheckboxInput from './components/CheckboxInput';
7+
import RadioInput from './components/RadioInput';
8+
import TextInput from './components/TextInput';
9+
import NumberInput from './components/NumberInput';
10+
import TextAreaInput from './components/TextAreaInput';
11+
import SelectInput from './components/SelectInput';
12+
import MultiSelectInput from './components/MultiSelectInput';
13+
import MultiCheckboxInput from './components/MultiCheckboxInput';
1314

1415
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
1516

16-
type Stooge = "larry" | "moe" | "curly";
17+
type Stooge = 'larry' | 'moe' | 'curly';
1718
interface Values {
1819
firstName?: string;
1920
lastName?: string;
@@ -32,7 +33,12 @@ const onSubmit = async (values: Values) => {
3233

3334
const App: React.FC = () => (
3435
<Styles>
35-
<h1><span role="img" aria-label="final form flag">🏁</span> React Final Form</h1>
36+
<h1>
37+
<span role="img" aria-label="final form flag">
38+
🏁
39+
</span>{' '}
40+
React Final Form
41+
</h1>
3642
<h2>Strongly Typed Values with TypeScript</h2>
3743
<p>
3844
Strongly Typed form values and field values. Each input requires a
@@ -44,7 +50,7 @@ const App: React.FC = () => (
4450
</a>
4551
<Form
4652
onSubmit={onSubmit}
47-
initialValues={{ stooge: "larry", employed: false }}
53+
initialValues={{ stooge: 'larry', employed: false }}
4854
render={({ handleSubmit, form, submitting, pristine, values }) => (
4955
<form onSubmit={handleSubmit}>
5056
<div>
@@ -108,7 +114,7 @@ const App: React.FC = () => (
108114
component={MultiCheckboxInput}
109115
type="checkbox"
110116
value="ketchup"
111-
/>{" "}
117+
/>{' '}
112118
Ketchup
113119
</label>
114120
<label>
@@ -117,7 +123,7 @@ const App: React.FC = () => (
117123
component="input"
118124
type="checkbox"
119125
value="mustard"
120-
/>{" "}
126+
/>{' '}
121127
Mustard
122128
</label>
123129
<label>
@@ -126,7 +132,7 @@ const App: React.FC = () => (
126132
component="input"
127133
type="checkbox"
128134
value="mayonnaise"
129-
/>{" "}
135+
/>{' '}
130136
Mayonnaise
131137
</label>
132138
<label>
@@ -135,7 +141,7 @@ const App: React.FC = () => (
135141
component="input"
136142
type="checkbox"
137143
value="guacamole"
138-
/>{" "}
144+
/>{' '}
139145
Guacamole 🥑
140146
</label>
141147
</div>
@@ -149,7 +155,7 @@ const App: React.FC = () => (
149155
component={RadioInput}
150156
type="radio"
151157
value="larry"
152-
/>{" "}
158+
/>{' '}
153159
Larry
154160
</label>
155161
<label>
@@ -158,7 +164,7 @@ const App: React.FC = () => (
158164
component={RadioInput}
159165
type="radio"
160166
value="moe"
161-
/>{" "}
167+
/>{' '}
162168
Moe
163169
</label>
164170
<label>
@@ -167,7 +173,7 @@ const App: React.FC = () => (
167173
component={RadioInput}
168174
type="radio"
169175
value="curly"
170-
/>{" "}
176+
/>{' '}
171177
Curly
172178
</label>
173179
</div>
@@ -195,5 +201,5 @@ const App: React.FC = () => (
195201
</Styles>
196202
);
197203

198-
const rootElement = document.getElementById("root");
204+
const rootElement = document.getElementById('root');
199205
render(<App />, rootElement);

0 commit comments

Comments
 (0)