Skip to content

Commit

Permalink
use event.reactName
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Feb 4, 2022
1 parent 486fe1d commit c368af6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/make-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit c368af6

Please sign in to comment.