Category "styled-components"

Import .svg and resize .svg use styled-components in next.js

I am currently trying import .svg into next.js project but I failed. I tried import .svg same way as in react project, that I created typing.d.ts and import svg

Is there anyway in styled-components to extend createGlobalStyle

I am importing GlobalStyle from a library which has been created using createGlobalStyle. Is there any way to extend like ... cont { GlobalStyle } from "another

Props conditional rendering using styled-components

I am using styled-components library inside a React application and I have this block for example: const Wrapper = styled.div` background: red; `; I need t

Moved from React Native Stylesheet to Styled components. How to add elevation when styled components do not recognize elevation as a property?

I have the following simple component that used React Native Stylesheet up until now, but right now I'm trying to move onto Styled components. I'm just a bit co

How to remove unwanted Emmet Abbreviation in vs code autoComplete suggestion

How to remove default value in Emmet Abbreviation suggestion? For example, I want background-color : ; instead of background-color:#fff; need to manually remov

Best practice for React. Hover or mouseEnter/mouseLeave?

I'm learning React with styled components and I have a button with a simple hover-effect. This hover-effect can be created in the styled components file with &a

Media Queries in Material-UI Using Styled-Components

Material UI has a nice set of built-in media queries: https://material-ui.com/customization/breakpoints/#css-media-queries Material UI also allows us to use S

Media Queries in Material-UI Using Styled-Components

Material UI has a nice set of built-in media queries: https://material-ui.com/customization/breakpoints/#css-media-queries Material UI also allows us to use S

Typechecking React library with Styled Components

I'm currently working in a design system library to test some things. Basically, the library is a Styled Component wrapper in order to create themes. I built th

How to render global styles from styled-components in Storybook?

Cannot render storybook application when trying to add global styles to the config file. It was working before and when I tried to add the knobs addons it brok

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