-
Notifications
You must be signed in to change notification settings - Fork 221
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: Create new Graphic component #3049
Comments
If we assumed the base URL was always the same it could go in the CKR provider. One downside with background images is you don't get the same callbacks you get with |
@vibdev Yeah, it could be an |
Is there any desire to make it a Also one other thought is, this might be a really good use case for web components, there is no reactivity so might fit. |
Closing in favor of #3107 |
🚀 Feature Proposal
Create a new Graphic component that pulls SVGs from a URL instead of injecting the graphic as inner HTML within the component.
Motivation
__dangerouslySetInnerHTML
We could also refactor the existing Graphic component, but I think it's a better idea to add this to
canvas-kit-preview-react
and allow consumers to adjust over time. Adding a new component would also allow us to roll this out to teams sooner.Example
The API could look something like this:
Under the hood, we would use set the
imageName
as a CSS var in our stencil and pass it along to thebackgroundImage
.Open to discussion on this. 😄
The text was updated successfully, but these errors were encountered: