Skip to content

fix(web-component): interpolate cssImportPath in style tag#1232

Open
ScriptShah wants to merge 2 commits intoasyncapi:masterfrom
ScriptShah:fix/web-component-css-import
Open

fix(web-component): interpolate cssImportPath in style tag#1232
ScriptShah wants to merge 2 commits intoasyncapi:masterfrom
ScriptShah:fix/web-component-css-import

Conversation

@ScriptShah
Copy link

Description

  • JSX does not interpolate variables inside string literals, causing the browser to receive a literal @import '{finalCssImportPath}'; string.

Changes proposed in this pull request:

  • Fix interpolation of cssImportPath inside the web component <style> tag.
  • Replace the literal string @import '{finalCssImportPath}'; with a proper JSX expression:
<style>{`@import '${finalCssImportPath}';`}</style>

Related issue(s)
Fixes #1207

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web component CSS import path is not interpolated in style tag

1 participant