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

Emoji react icons should use <svg> rather than <img> #9

Open
krazkidd opened this issue Oct 2, 2023 · 4 comments
Open

Emoji react icons should use <svg> rather than <img> #9

krazkidd opened this issue Oct 2, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Merged pull requests that resolve this issue will be labeled with "hacktoberfest-accepted"

Comments

@krazkidd
Copy link
Owner

krazkidd commented Oct 2, 2023

See ScoreboardEmojiButton component. This should use an element to source the image like we do in the LineupJerseyButton component.

The motivation for this is to be able to manipulate the images in real time, like say with filters or enhanced animations, though I'm not sure what can be done that CSS doesn't support in some way.

@krazkidd krazkidd added enhancement New feature or request good first issue Good for newcomers hacktoberfest Merged pull requests that resolve this issue will be labeled with "hacktoberfest-accepted" labels Oct 2, 2023
@fjuren
Copy link

fjuren commented Oct 2, 2023

I can work on this one

@krazkidd
Copy link
Owner Author

krazkidd commented Oct 2, 2023

You were quick to respond! Please give it a shot. Here is the HTML to start. You will want to use the :href binding but I couldn't get the dimensions working to actually show the image. Shouldn't take long.

<svg viewBox="0 0 100 100" width="40" height="40" xmlns="http://www.w3.org/2000/svg">
    <use x="0" y="0" width="40" height="40" :href="`/lineup/images/fluentui-emoji/${props.id}_color.svg`" />
</svg>

I need to update the README but you can start the dev environment with this:

npm install -g firebase-tools
firebase emulators:start
npm run dev

Thank you.

@fjuren
Copy link

fjuren commented Oct 2, 2023

Thanks for the info above. I can't seem to figure out why it's not showing the image, sorry about that.. it might be best to unassign me so someone else can give it a go. Good luck!

@krazkidd
Copy link
Owner Author

krazkidd commented Oct 2, 2023

Thanks for taking a look, @fjuren!

@krazkidd krazkidd changed the title Emoji react icons should use <svg> rather than <img> Emoji react icons should use <svg> rather than <img> Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest Merged pull requests that resolve this issue will be labeled with "hacktoberfest-accepted"
Projects
None yet
Development

No branches or pull requests

2 participants