Closed mhpaler closed 1 year ago
would like to do something like this:
import OutlinkSVG from "@app/assets/Outlink.svg"; const OutlinkIcon = tw.div`p-2`; <OutlinkIcon $as={OutlinkSVG} />
But react complains with:
Unhandled Runtime Error Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `tw.div`.
Any ideas?
Ugh. nevermind, just didn't have @svgr/webpack and webpack configured for svgs as components.
@svgr/webpack
would like to do something like this:
But react complains with:
Any ideas?