Skip to content

Commit 53fd3f0

Browse files
authored
🤖 Merge PR DefinitelyTyped#74250 [react] Add missing SVG attributes: nonce, part, and slot by @okathira
1 parent 6c487a4 commit 53fd3f0

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

‎types/react/index.d.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3564,6 +3564,9 @@ declare namespace React {
35643564
method?: string | undefined;
35653565
min?: number | string | undefined;
35663566
name?: string | undefined;
3567+
nonce?: string | undefined;
3568+
part?: string | undefined;
3569+
slot?: string | undefined;
35673570
style?: CSSProperties | undefined;
35683571
target?: string | undefined;
35693572
type?: string | undefined;

‎types/react/test/elementAttributes.tsx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const testCases = [
2929
<span lang="art-x-tokipona" />,
3030
<input placeholder="placeholder" />,
3131
<span slot="my-text" />,
32+
<svg slot="my-svg" />,
3233
<span spellCheck />,
3334
<span tabIndex={0} />,
3435
<span title="title" />,
@@ -101,6 +102,7 @@ const testCases = [
101102
open
102103
/>,
103104
<link nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
105+
<svg nonce="8IBTHwOdqNKAWeKl7plt8g==" />,
104106
<center></center>,
105107
// Float
106108
<>
@@ -171,6 +173,7 @@ const testCases = [
171173
<>
172174
<template>
173175
<div part="base" />
176+
<svg part="svg" />
174177
<custom-element exportparts="nested" />
175178
</template>
176179
</>,

0 commit comments

Comments
 (0)