kopia lustrzana https://github.com/shoelace-style/shoelace
use event.reactName
rodzic
486fe1dfc4
commit
c368af633c
|
@ -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';
|
||||
|
|
Ładowanie…
Reference in New Issue