Last active
March 14, 2025 17:55
-
-
Save gerwld/3f03d2d088f169c15c1f4c3b2b4cc44a to your computer and use it in GitHub Desktop.
Snippets for Typescript React
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To open and edit javascriptreact.json in VS Code: | |
// Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the Command Palette. | |
// Type Preferences: Configure User Snippets and select it. | |
// Choose javascriptreact.json from the list. | |
{ | |
"Add Styles Import": { | |
"prefix": "ims", | |
"body": ["import style from './style.module.css';"], | |
"description": "Styles Import" | |
}, | |
"Add Styles Import 2": { | |
"prefix": "imss", | |
"body": ["import s from './s.module.css';"], | |
"description": "Styles Import" | |
}, | |
"Add react-icons import": { | |
"prefix": "imi", | |
"body": ["import {$1} from 'react-icons/$2';"], | |
"description": "Import react-icons" | |
}, | |
"Create Stylesheet.create base": { | |
"prefix": "stc", | |
"body": [ | |
"", | |
"const styles = StyleSheet.create({\nblock: {\n$0\n},\nchild: {\n\n},\nt: {\n\n},\n});", | |
"", | |
], | |
"description": "Adds Stylesheet.create base" | |
}, | |
"add styles fast": { | |
"prefix": "st", | |
"body": [ | |
"className={style.$0}", | |
], | |
"description": "Adds Stylesheet.create base" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment