menu

styled-components

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

Channels
Team
Posts
Chat
Members
Info
down-caret

Translate the docs to Brazilian Portuguese

Hello guys, If I want to help the project doing the translation of the docs to brazilian portuguese, how could I do that?

thumbsup
0
message-simple
0

any good practices test styled-components with jest suggest??

now i use jest and enzyme, when i use shallow or mount. it looks like some for me .just some return wrapper api differents for me . i confuse when i should use mount or shallow with styled-component. …

thumbsup
0
message-simple
3

Certain props are being passed as HTML attributes. why?

Why certain props are being rendered as HTML attributes? These props are display, wrap, direction, color. Have a look here and inspect the "one" element. Screenshot:

thumbsup
2
message-simple
3

Typescript undefined error caused by optional props

theme.button is optional, but I also created a default theme. Is there another way to rewire this without error?

thumbsup
0
message-simple
1

Warning to use `attrs` method even though I am?

I had a styled component that was rendering 3 times, each having a parallax effect. The parallax is achieved by updating the bottom value every scrollEvent through a pretty expensive calculation. Meaning, this component is getting re-rendered very often. Unsurprisingly, I was…

thumbsup
0
message-simple
0

How do I properly pass a ref to custom component function-style?

I have this Button looking like a link, I need to pass ref to original Button component so It can be used as trigger target for Modals. How do I refactor my LinkButton to pass the ref?

thumbsup
0
message-simple
0

Trying to Style <Input/> from Semantic UI using Styled Components

So Input is defined as <Input placeholder='Search...' /> in SemanticUI-React. And the HTML format is So when I use style components it is applied to <div/>. Is there any way I can apply the style to <input/> which is the child tag? …

thumbsup
0
message-simple
2

StyleSheetManager in React Native?

I am getting an error when using StyleSheetManager on styled-components/native. Some features like media queries are not compatible with native but I don't see why changing styles like stylis-rtl would not be usable in this case. any ideas?

thumbsup
0
message-simple
0

God himself would choose styled-components over emotion, its just a fact.

Seriously. I bet he would.

thumbsup
3
message-simple
2

How to extend a styled component correctly?

The button component is like this: I have this code, but some how the ShowButton extension doesn't seem to do absolutely anything. Isn't this the correct way to extend an existing styled component?

thumbsup
0
message-simple
6