[react] add translate prop to HTMLAttributes (#40211)

This commit is contained in:
Yaroslav Serhieiev
2019-11-22 18:35:33 +02:00
committed by Sheetal Nandi
parent 4e575afb73
commit dfdfc84670
3 changed files with 31 additions and 0 deletions

View File

@@ -1669,6 +1669,7 @@ declare namespace React {
style?: CSSProperties;
tabIndex?: number;
title?: string;
translate?: 'yes' | 'no';
// Unknown
radioGroup?: string; // <command>, <menuitem>

View 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" />,
];

View File

@@ -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"