Skip to content

Commit b6f7ece

Browse files
TalhaAbidTalha Abid
and
Talha Abid
authored
add a typed functional react component for tsx files (#69)
* add a typed functional react component for tsx files * Changed to file-name-base and shorter key Co-authored-by: Talha Abid <[email protected]>
1 parent 5c0eb5b commit b6f7ece

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

typescript-tsx-mode/.yas-parents

+3
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
+web-react-mode
12
typescript-mode
3+
rjsx-mode
4+

typescript-tsx-mode/componentTSX

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- mode: snippet -*-
2+
# contributor: Talha Abid
3+
# name: functionalComponentTSX
4+
# key: fct
5+
# --
6+
import React from 'react';
7+
8+
interface ${1:`(file-name-base buffer-file-name)`}PropTypes {
9+
10+
}
11+
12+
const $1 = (props: $1PropTypes) => (
13+
$0
14+
);
15+
16+
export { $1 };

0 commit comments

Comments
 (0)