mirror of
				https://github.com/theoludwig/theoludwig.git
				synced 2025-10-14 20:23:25 +02:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| {
 | |
|   "React Component": {
 | |
|     "scope": "typescriptreact",
 | |
|     "prefix": "rfc",
 | |
|     "body": [
 | |
|       "export interface ${1:ComponentName}Props {}",
 | |
|       "",
 | |
|       "export const ${1:ComponentName}: React.FC<${1:ComponentName}Props> = () => {",
 | |
|       "  return (",
 | |
|       "    <div>",
 | |
|       "      <h1>${1:ComponentName}</h1>",
 | |
|       "    </div>",
 | |
|       "  )",
 | |
|       "}",
 | |
|       "",
 | |
|     ],
 | |
|     "description": "React Component",
 | |
|   },
 | |
|   "React Component Story": {
 | |
|     "scope": "typescriptreact",
 | |
|     "prefix": "rfcs",
 | |
|     "body": [
 | |
|       "import type { Meta, StoryObj } from \"@storybook/nextjs\"",
 | |
|       "",
 | |
|       "import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}.tsx\"",
 | |
|       "",
 | |
|       "const meta = {",
 | |
|       "  title: \"${1:ComponentName}\",",
 | |
|       "  component: ${1:ComponentName}Component",
 | |
|       "} satisfies Meta<typeof ${1:ComponentName}Component>",
 | |
|       "",
 | |
|       "export default meta",
 | |
|       "",
 | |
|       "type Story = StoryObj<typeof meta>",
 | |
|       "",
 | |
|       "export const ${1:ComponentName}: Story = {",
 | |
|       "  args: {}",
 | |
|       "}",
 | |
|       "",
 | |
|     ],
 | |
|     "description": "React Component Story",
 | |
|   },
 | |
| }
 |