Advertisement
kazlik

Editor > File and Code Templates > TypeScript JSX File

Jul 31st, 2020 (edited)
5,298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #parse("FilenameNoExtension")
  2. "use strict"
  3.  
  4. import * as React from "react"
  5.  
  6. type ${filenameNoExtension}Props = {}
  7.  
  8. export const ${filenameNoExtension} = ( props: ${filenameNoExtension}Props ) => {
  9.     return (
  10.         <>
  11.             Hello World
  12.         </>
  13.     )
  14. }
  15.  
  16. #Plus do includes si pridat "FilenameNoExtension" s obsahem
  17. #set($filename = ${FILE_NAME})
  18. #set($index=$filename.length() - 4)
  19. #set($filenameNoExtension = $filename.substring(0, $index))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement