Hello, I'd like to set some basic styles for an component which is passed as a prob. Not sure how to set some base styles for thats passed component. This is where I'am struggling with: How I apply the baseStyles to <Component/> ? Something like this. But the docs say don't use…
@import of Google Font not working in v5
I have an import of a google font in my createGlobalStyle that was previously working with v4 of styled-components. Now it doesn't seem to be getting loaded in at all. Has anyone else had this issue? Will create a github issue if this is a new. Thanks!
css prop not working with Rollup
I dont seem to be able to get the css property to work when building my library with Rollup. Is there a specific way I need to be handling this with the babel plugin? When I build the above into a lib, then import it into another application, the css prop doesn't seem to take…
createGlobalStyle() and shouldComponentUpdate()...?
hey there 👋 having recent migrated to styled-components v4, i'm noticing that now that i'm using createGlobalStyle() to render my global styles, they are being re-rendered on each change. this causes my entire page to reflow as fonts are re-fetched and applied (amongst other…
TypeScript: Extend React component props for styled component element
i'm trying to extend a react components props in TypeScript so that it contains all the normal html button attributes, as well as react specific stuff like ref My understanding is that the type React.HTMLProps is what i need, (React.HTMLAttributes doesn't contain ref) However,…
Possible to generate a StyledComponent with a className without a comoponent?
I am using ReactHoverObserver which generates its own div that needs restyling - it does give me the ability to provide a className I'd like to use styled-components here though. Is there a way I can generate a styled component and just get back the className to use as I wish?