menu

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# Help
view-forward
# jest
view-forward
# Off Topic
view-forward
# Website
view-forward
Team
Posts
Members
Info

ThemeProvider does not pass theme prop to reactstrap tooltip

Hey everyone, I am trying to use a styled-component inside the reactstrap tooltip, but the theme prop is not present there. The app is encapsulated using the ThemeProvider component to pass the theme across the app to all styled-components. Anything that I am missing here ?

thumbsup
1
message-simple
2

prettier auto-formatting for "css helper" functions not working

Using prettier with eslint as my auto-formatting/linter but formatting isn't working for css helper functions e.g won't get formatted. however, preprending styled.someRandomMethodfont-size:2px;margin:blah;` does format it …

thumbsup
0
message-simple
1

Get CSS styles working with prerender.io

I'm trying to use SSR for my React app. I'm running prerender (https://github.com/prerender/prerender) on my own server. Everything works fine, apart from the styles. I've read the documentation about SSR (https://www.styled-components.com/docs/advanced#server-side-rendering)…

thumbsup
2
message-simple
16

Could not find a declaration file for module 'styled-components/native'.

Hi i'm working on a new ts expo react native app and i had install styled-component 5.2.1, also "@types/styled-components-react-native": "^5.1.0" BUT i have this error : Could not find a declaration file for module 'styled-components/native'.…

thumbsup
1
message-simple
3

Extending components conditioned by media query

Hi there! Just wondering if the following example is doable with styled-components: I have 2 heading components: 1. Heading1 — Renders with font-size: 48px …

thumbsup
0
message-simple
0

styled-components with Storybook

I'm using storybook to build up my components which are made with styled-components and I want to import them into Storybook, and when I do import the component into my story, it returns me this error: I followed the guide to set up Storybook with Preact here,…

thumbsup
1
message-simple
5

What does the forwardedProp API look like? How to use forwardedAs prop?

Here are the docs on forwardedAs prop: https://styled-components.com/docs/api#forwardedas-prop. As you can see, there isn't much that tells us how to use this forwardedAs prop. My goal is to forward several props down to the component that is being rendered from the as prop.…

thumbsup
0
message-simple
1

react-native animation scale

Hi How can i do this type of animation with styled component ?? const animation = { y: startValue.interpolate({ …

thumbsup
0
message-simple
0

How to extend styles with changes on the same component

I want to use a different color for the same component at different places. E.g: I have a navigation bar that sits at top of every page. So It's in the App.js file. …

thumbsup
0
message-simple
0

What are the performance drawbacks when swapping out whole components?

Let's say each item in the Options object is a pre-customized component and we supply Choice directly from our server. Also, is anyone else doing it this way?

thumbsup
0
message-simple
0