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

chore(ui5-media-gallery): migrate to jsx template #10614

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

kineticjs
Copy link
Contributor

No description provided.

@kineticjs kineticjs force-pushed the media-gallery-jsx-template branch from a59a4f1 to 849f195 Compare January 22, 2025 10:06
@kineticjs kineticjs marked this pull request as ready for review January 22, 2025 11:57
>
<div class="ui5-media-gallery-item-mask-layer"></div>
<div class="ui5-media-gallery-item-wrapper" style={this.styles.wrapper}>
{this._showBackgroundIcon && <Icon name="background"></Icon>}
Copy link
Member

@ilhan007 ilhan007 Jan 22, 2025

Choose a reason for hiding this comment

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

One new thing around the migration is that we also encourage importing the used icons in the template
and make use of its default export to bind it:

import background from "@ui5/webcomponents-icons/dist/background.js";

<Icon name={background}></Icon>

This way we will avoid icons missed to be imported, because using the hardcoded string does not have relation to the import.

*afterwards, you can remove the import from the MGitem class

{this._isPhonePlatform
? <Carousel
onNavigate={this._onCarouselNavigate}
hideNavigationArrows
Copy link
Member

Choose a reason for hiding this comment

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

really minor - explicitly setting to true is recommended => hideNavigationArrows={true}

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