#Resizing the Image component

10 messages · Page 1 of 1 (latest)

iron oriole
#

I have this component right here:
<Image
id='gamp-logo'
width='125'
height='125'
src='/images/logo-black.png'
alt='Our logo'
/>

and I'd love to resize it a bit smaller after the searchStatus is changed. I'm using a click handler to change that so it's all alright. the thing is that the properties width and height, which are mandatory, in a Image component, are static. I can't change it with the className as I wish to do it like this:

className={transition-width ${!searchStatus ? 'w-125' : 'w-100'}}

Hope I'm not confusing things too much.

signal dewBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

past heart
#

ima try to help

#

gotta make myself feel better after failing miserably all of yesterday and this morning as well

#

something like this could work

#

id try it and if it doesnt dont blame me for wasting your time 🙂

#

im a python/c++ person

#

@iron oriole

iron oriole
#

thanks for the effort @past heart I’ve found a solution using the img tag inside a picture tag