Skip to content
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

Image component: Ability to provide a different image for the dark theme #671

Open
paralexm opened this issue Jan 6, 2024 · 1 comment

Comments

@paralexm
Copy link
Contributor

paralexm commented Jan 6, 2024

In certain scenarios I need to provide an alternate image for the dark theme. With the application logo, we can provide a different image with the logo and logoDark properties, but for the image component, I like the simplicity of what Writerside is doing: If a second image with the _dark suffix is present, it will be used when the dark theme is in use.

So a folder with the two images:
image.png
image_dark.png

And an image component defined like this:

![](image.png)

The image.png would be used with the light theme and the image_dark.png would be used in the dark theme.

@paralexm paralexm changed the title Image Component: Ability to provide specific images for the dark theme Image component: Ability to provide specific images for the dark theme Jan 6, 2024
@paralexm paralexm changed the title Image component: Ability to provide specific images for the dark theme Image component: Ability to provide a different image for the dark theme Jan 6, 2024
@paralexm
Copy link
Contributor Author

paralexm commented Jan 6, 2024

The current workaround is described in #571

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

No branches or pull requests

1 participant