kopia lustrzana https://github.com/shoelace-style/shoelace
Update `make-react.js` script to use new @lit-labs/react createComponent options object (#1090)
* Update react wrapper signature Updated react createComponent to use new options object * removed unused pascalCase importpull/1098/head
rodzic
417f0d17c9
commit
0e1b792bf7
|
@ -3,7 +3,6 @@ import fs from 'fs';
|
|||
import path from 'path';
|
||||
import chalk from 'chalk';
|
||||
import { deleteSync } from 'del';
|
||||
import { pascalCase } from 'pascal-case';
|
||||
import prettier from 'prettier';
|
||||
import prettierConfig from '../prettier.config.cjs';
|
||||
import { getAllComponents } from './shared.js';
|
||||
|
@ -40,14 +39,14 @@ components.map(component => {
|
|||
import { createComponent } from '@lit-labs/react';
|
||||
import Component from '../../${importPath}';
|
||||
|
||||
export default createComponent(
|
||||
React,
|
||||
'${component.tagName}',
|
||||
Component,
|
||||
{
|
||||
export default createComponent({
|
||||
tagName: '${component.tagName}',
|
||||
elementClass: Component,
|
||||
react: React,
|
||||
events: {
|
||||
${events}
|
||||
}
|
||||
);
|
||||
});
|
||||
`,
|
||||
Object.assign(prettierConfig, {
|
||||
parser: 'babel-ts'
|
||||
|
|
Ładowanie…
Reference in New Issue