Skip to content

Assets add exports for web usage #3552

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

Closed
wants to merge 1 commit into from

Conversation

adids1221
Copy link
Contributor

@adids1221 adids1221 commented Mar 5, 2025

Description

When using Image in web we need to pass the width and height style props.
Assets add exports for web usage that include the asset dimensions.
For now Iv'e add the same size to al the icons (24x24 which is the regular size).

TODO: Add explanation about using images on web

Changelog

Assets support on web.

Additional info

MADS-4531

@adids1221
Copy link
Contributor Author

I'm not sure where is the right place to add explanation about that, WDYT?

Copy link
Collaborator

@M-i-k-e-l M-i-k-e-l left a comment

Choose a reason for hiding this comment

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

This is about web behavior in general and not just docs, right?

return {uri: require('./xMedium.png'), dimensions: {width: 24, height: 24}};
},
get xFlat() {
return {uri: require('./xFlat.png'), dimensions: {width: 24, height: 24}};
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure about the size for all of these assets, for example xFlat has 16 in private

@@ -0,0 +1,5 @@
export const images = {
get gradient() {
return {uri: require('./gradient.png'), dimensions: {width: 56, height: 2}};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this used somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doesn't look like.

@adids1221
Copy link
Contributor Author

Closing this PR, moved to 3604.

@adids1221 adids1221 closed this Mar 11, 2025
@adids1221 adids1221 mentioned this pull request Mar 16, 2025
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