styled-components Questions

2

Solved

There are lot of solutions out there to hide the input spinner using css. One of them being: input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { -webkit-appearance: none !importa...
Salt asked 29/5, 2019 at 2:28

4

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/styled-components/issues/1589 My code...
Sombrero asked 22/7, 2020 at 8:7

2

I'm working in React with typescript and styled components. I'm also using material-ui library. I've created styled material-ui buttons like below: import React from 'react' import styled from 'sty...
Bounteous asked 12/8, 2021 at 10:18

2

ERROR MESSAGE: Server Error TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. Read more: https://nextjs.org/docs/...

2

Solved

No matter what I try, I can't seem to get true Placeholder functionality for the Material-UI Select component. Using a placeholder prop on <Select /> did not work, and it looks like it's eith...
Grochow asked 30/8, 2019 at 0:2

4

Solved

If you add styled-components to your React Native project, there's a sub-directory for the native components specifically: import styled from 'styled-components/native`; export const Container = s...
Willamina asked 20/6, 2022 at 16:52

2

error Screenshot I used fullWidth as a property. when I remove those, I see also the error. I used isLoading as a variable, not a prop. I didn't use colorKey in our code. but found this err...
Pedropedrotti asked 22/2, 2021 at 13:2

6

Solved

SO community, I can't figure out the correct type definition for an RN FlatList styled with Styled Components in Typescript So I have type IProduct like that interface IProduct { id: string; name...
Chiropractic asked 21/10, 2020 at 8:56

2

I am using TypeScript(v4.2.3) and Material UI(v4.11.3), and trying to pass the custom props to styled component. import React from 'react'; import { IconButton, styled, } from '@material-ui/core'...
Villeneuve asked 29/6, 2021 at 3:19

3

Solved

I want to make a dynamic component. (the dynamic TAG will be a styled component -> emotion) const Dynamic = ({ tag: Tag, children, ...rest }) => <Tag {...rest}> { children } </Tag&g...
Embrasure asked 30/8, 2018 at 9:21

3

Solved

I'm trying to use styled-components with typescript and with a BEM structure So I have a simple example like index.tsx import styled from 'styled-components' import Header from './Header' interfac...
Southwestwards asked 16/4, 2020 at 15:25

1

Solved

When using styled-components in Next with React, it can become challenging to ensure that the styled components render correctly. To address this issue, Next supplies the compiler.styledComponents ...
Vidovik asked 17/4, 2023 at 10:37

2

Is there a way to pass the pressed property to styled-components? What I have now: import React from 'react'; import { Pressable, Text, View } from 'react-native'; import styled from 'styled-compon...
Revivalism asked 15/10, 2020 at 0:54

6

Solved

I am using styled-components in a React project. When the components are rendered in the browser they are assigned a randomly generated classname, for example: <div class="sc-KSdffgy oPwefl"&gt...
Saintsimon asked 4/8, 2017 at 10:52

1

In an app derived from react-boilerplate using styled-components 3.3.2 I am trying to display SVGs in pseudo-classes like this: import arrowDown from 'images/ico-arrow-down.svg' import arrowUp f...
Price asked 1/9, 2018 at 16:47

2

Solved

I am trying to export a react but getting this TS error which I am unable to resolve. Here is the component: import React, { useEffect, MutableRefObject, forwardRef, RefObject } from 'react'; i...
Reiff asked 1/9, 2020 at 12:49

2

Solved

I am working with styled-components and Formik. Everything is working well except textareas or selects etc. Styled-components and Formik have got same attribute as and when I want to connect this I...
Discophile asked 18/5, 2020 at 12:47

5

What is the best way to style the Link using the styled-components library in the code that follows. I can find lots of examples to work with anchor tag but none to work with react-router link. Am ...
Mezzanine asked 11/12, 2019 at 15:14

7

Is there a way to import a CSS file into a styled component? One of my dependencies, React Quill Editor, is themeable by importing their CSS as a base and applying changes on top of it. All of my ...
Arguelles asked 17/3, 2018 at 13:53

3

Solved

This could well be a newbie issue and easily resolved. I have a basic local nextjs app using styled components, it seems to throw up this error: Here's the full code just incase: react-dom.develop...
Vendue asked 3/2, 2021 at 15:40

3

Solved

Using MUI with typescript and want to use styled from MUI as well. When passing the component prop to the styled component I get an error from the typescript sandbox below, maybe anyone knows a wor...
Yonatan asked 26/2, 2021 at 15:28

5

Solved

I just started using Material UI 5.0.4 (with styled-components), and I wanted to access the theme in a component. I looked online and saw useTheme, so I checked the docs and found it - @mui/styles/...
Foushee asked 19/10, 2021 at 1:39

3

I am new to React and Typescript, I am trying to add dark-mode to my project, I created globalStyle component, Themes component and using Themeprovider. I am facing an issue on my globalStyle compo...
Grange asked 4/3, 2021 at 22:24

3

Solved

I'm trying to import fonts from a local resource in my react project which uses webpack and styled components. I have a fonts folder with the following code: import { css } from 'styled-component...
Nazarene asked 6/3, 2019 at 20:29

5

Solved

I'm using antd NPM package's Select component. I want to remove the blue outline which appears when the component is focussed. How can I remove it ? I have tried styling the component using styled...
Tribble asked 16/10, 2019 at 10:15

© 2022 - 2024 — McMap. All rights reserved.