mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[react] add translate prop to HTMLAttributes (#40211)
This commit is contained in:
committed by
Sheetal Nandi
parent
4e575afb73
commit
dfdfc84670
1
types/react/index.d.ts
vendored
1
types/react/index.d.ts
vendored
@@ -1669,6 +1669,7 @@ declare namespace React {
|
||||
style?: CSSProperties;
|
||||
tabIndex?: number;
|
||||
title?: string;
|
||||
translate?: 'yes' | 'no';
|
||||
|
||||
// Unknown
|
||||
radioGroup?: string; // <command>, <menuitem>
|
||||
|
||||
29
types/react/test/elementAttributes.tsx
Normal file
29
types/react/test/elementAttributes.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import * as React from 'react';
|
||||
|
||||
const testCases = [
|
||||
<span />,
|
||||
<span accessKey="s" />,
|
||||
<span className="klass" />,
|
||||
<span contentEditable />,
|
||||
<span contextMenu="menuId" />,
|
||||
<span dir="rtl" />,
|
||||
<span draggable />,
|
||||
<span hidden />,
|
||||
<span id="s" />,
|
||||
<span lang="art-x-tokipona" />,
|
||||
<input placeholder="placeholder" />,
|
||||
<span slot="my-text" />,
|
||||
<span spellCheck />,
|
||||
<span tabIndex={0} />,
|
||||
<span title="title" />,
|
||||
<span role="button" />,
|
||||
<span autoCapitalize="off" />,
|
||||
<span autoCapitalize="none" />,
|
||||
<span autoCapitalize="on" />,
|
||||
<span autoCapitalize="words" />,
|
||||
<span autoCapitalize="sentences" />,
|
||||
<span autoCorrect="off" />,
|
||||
<span autoCorrect="on" />,
|
||||
<span translate="no" />,
|
||||
<span translate="yes" />,
|
||||
];
|
||||
@@ -5,6 +5,7 @@
|
||||
"test/index.ts",
|
||||
"test/tsx.tsx",
|
||||
"test/cssProperties.tsx",
|
||||
"test/elementAttributes.tsx",
|
||||
"test/managedAttributes.tsx",
|
||||
"test/hooks.tsx",
|
||||
"test/experimental.tsx"
|
||||
|
||||
Reference in New Issue
Block a user