Category "styled-components"

Creating styled-component with React.createElement

I would like to create a styled-component with a function, taking element as an argument, which I create with React.createElement call. const StyledComponent =

Styled Components Folder System

I've been reading various articles on styled-components in React. One such article suggested using presentation and structure components, but on the styled-comp

Not able to use relative values in React Native Styled Components

From the react native styled-components documentation, I've seen EM values being used in place of the usual px. However, when I try compiling my project which u

Register is not a function when passing as a prop?

I use react-hook-form for the first time. I was reading the docs and followed along. Likewise, I already laid out my components and styled them. Now I am trying

Changing inner HTML using props in styled-components

I want to add a styled component in react and pass props in it. Depending on the props the inner html should be changed. So is there some CSS property or someth

React — Passing props with styled-components

I just read in the styled-components documentation that the following is wrong and it will affect render times. If that is the case, how can I refactor the code

Customize TextInput Label of the react-native-paper in the case of React Native Web

I'm working with the React Native Web and React Native Paper library with Styled Components. Basically I would like to customize the TextInput inner components:

how customize style materail UI v5

I am trying to customize MUI to that import makeStyles import { makeStyles } from '@mui/styles'; I get this error when try install npm install @mui/styles npm

:hover element change ::after style another component

How can I change width StyledLi::after from 0% to 90%, after hover on StyledLink const StyledLink = styled(Link)` text-decoration: none; margin-right:

Styled Components / React - Style on external element

I'm using Material UI components and MaterialTable and I want to stylish the components using StyledComponents But I not been having the desired results when I

Styled Components / React - Style on Fragment element

I have a question with StyledComponents, it's possible to create a style using a React.Fragment or any other existing component? I use this example (The intent

How to pass props to a styled component in emotion? Using TypeScript

I am using styled by emotion at: import styled from '@emotion/styled' I am trying to pass props to a styled component like the guide mentions: https://emoti

StyledComponents with Typescript and ThemeProvider. What are the right types?

I have problems to get the right types when using StyledComponents with ThemeProvider. I have tried it with this approach: https://github.com/styled-components/

How to select parent components variant in styled components?

In styled-components we can add contextual styles using component selector pattern. But how do we select specific parents variants to contextually style the chi

How do I configure prettier to format tsx file which use styled component?

Here is what is expected after formatting my file : export const StyledDiv = styled.div<StyledDivProps>` width: 56px; height: 30px; `; And this i

Approach to creating variants with styled components

What is the best way to create variants using styled components? Heres what i am currently doing. const ButtonStyle = styled.button` padding:8px 20px; bor

Flash Of Unstyled Text (FOUT) on reload using next.js and styled components

I'm using global style from styled components with next.js and every time I reload my page I can see the font flickering. I have my font files in public/fon

Getting "Types of property 'accessibilityRole' are incompatible" error

Am getting typescript error when i extend th TextProps from react-native and pass it to the Text component created by styled-component Overload 1 of 2, '(prop