-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tools): parameterize react wrapper generator #2650
Conversation
🦋 Changeset detectedLatest commit: 8fb3588 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran a build and pulled this downstream into RHDS and the react wrapper branch. Everything seemed to work until I looked at secondary nav which contains a depreciated tag:
@customElement('rh-secondary-nav')
class RhSecondaryNav extends RhNavigationSecondary {
#logger = new Logger(this);
constructor() {
super();
this.#logger.warn('rh-secondary-nav is deprecated. Use rh-navigation-secondary instead.');
}
}
and
declare global {
interface HTMLElementTagNameMap {
'rh-navigation-secondary': RhNavigationSecondary;
'rh-secondary-nav': RhSecondaryNav;
}
}
This caused the ouput for the react wrapper to be:
// elements/rh-navigation-secondary/rh-navigation-secondary.js
import { createComponent } from '@lit/react';
import react from 'react';
import { rh-secondary-nav as elementClass } from '@rhds/elements/elements/rh-navigation-secondary/rh-navigation-secondary.js';
export const Rh-secondary-nav = createComponent({
tagName: 'rh-secondary-nav',
elementClass,
react,
events: {
onOverlayChange: 'overlay-change',
},
});
The import and the export class name appear to pick up the second export fromrh-navigation-secondary
and use it with dashes instead of NavigationSecondary
.
Will take a look for a resolution.
solution:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢 it!
Let's get those modules
Closes #2649
What I did
Testing Instructions