Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit da5e5e1

Browse files
update generic PropTypes snippet (w/ choices)
* string|number|bool|func|any|...
1 parent 65fbf41 commit da5e5e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ u-rfc // Functional component (stateless)
2424

2525
* PropTypes
2626
```javascript
27-
u-pt // Generic PropType
27+
u-pt // Generic PropType (string|number|func|...)
2828
u-pta // Array PropType
2929
u-ptany // Any PropType
3030
u-ptarrayof // Array Of (PropType)

‎snippets/snippets.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
"PropTypes": {
126126
"prefix": "u-pt",
127127
"body": [
128-
"1ドル: PropTypes.$2.isRequired"
128+
"1ドル: PropTypes.${2|string,number,bool,func,array,object,symbol,element,node,any|}.isRequired"
129129
],
130130
"description": "React PropType"
131131
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /