Today I learned

while using .src can be an option, it isn’t really a functional one for grabbing something from the component. I use relative paths for the initial link but the output on firefox is the absolute path making matching difficult

Also, keyof typeof is the best way to make sure something is of the type options to the key of a specific enum

let newFirst = event.currentTarget.id as keyof typeof ElementalColors;

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store