mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
use event.reactName
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user