use event.reactName

pull/664/head
Cory LaViska 2022-02-04 09:28:35 -05:00
rodzic 486fe1dfc4
commit c368af633c
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -30,11 +30,10 @@ components.map(component => {
const componentDir = path.join(reactDir, tagWithoutPrefix);
const componentFile = path.join(componentDir, 'index.ts');
const importPath = component.modulePath.replace(/^src\//, '').replace(/\.ts$/, '');
const events = (component.events || []).map(event => `${event.reactName}: '${event.name}'`).join(',\n');
fs.mkdirSync(componentDir, { recursive: true });
const events = (component.events || []).map(event => `${`on${pascalCase(event.name)}`}: '${event.name}'`).join(',\n');
const source = prettier.format(
`
import * as React from 'react';