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

Fix the override of the Image objectPosition attribute #521

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

ejulia
Copy link
Contributor

@ejulia ejulia commented Sep 28, 2024

Description

While experimenting with this great template, I noticed that when passing an objectPosition attribute to the image in the Hero2 component, the property is overridden by its default value (center) at line 119 in the images-optimization.ts file.

Issue details

  • Issue: The objectPosition prop in not passed to the getStyle function, causing it to default to center instead of using the provided value.
  • Affected file: images-optimization.ts
  • Affected function: getStyle

Fix

  • Destructured objectPosition from the props and passed it the getStyle function.

Impact

  • This fix ensures that the objectPosition attribute works as expected when used in components like Hero2.

I hope this PR is helpful! Let me know if any further adjustments are needed :)

@prototypa prototypa merged commit d903e6c into onwidget:main Oct 4, 2024
3 of 4 checks passed
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.

2 participants