score:0
remove the interface on the div and put it in your arrow function instead.
like this
const flex = styled.div`
display: flex;
flex-direction: ${(props: flexprops) => props.direction};
`;
Source: stackoverflow.com
Related Query
- Styled components Typescript interface not defined
- Styled Components not loaded - React Typescript Webpack setup
- How to implement an props interface for conditions with styled components in React with Typescript
- Warning: Prop `className` did not match. when using styled components with semantic-ui-react
- Using styled components with Typescript, prop does not exist?
- Using 'ref' on React Styled Components is not working
- Material-UI components not found during TypeScript module resolution
- Using styled components "as" prop with typescript
- type error extend is not a function in styled components
- Styled Components .attrs w/ TypeScript
- Media queries not working with styled components in React App
- Why does TypeScript assertion of object literal `{a}` work with interface `{a, b}` but not `{a?, b}`
- Styled components not overriding styles from another component
- Warning: Prop `className` did not match in Next.JS site with Styled Components
- Using Typescript with Styled Components and Material UI
- Styled components + typescript: "as" is not assignable to type IntrinsicAttributes
- ESLint: 'Partial' is not defined in typescript
- create-react-library not working with styled components
- Typescript test with Jest with Enzyme does not recognise components
- Styled Components TypeScript
- Typescript + Parcel new JSX transform - React is not defined error
- Objects are not valid as a React child with Styled components
- ERROR ReferenceError: React is not defined | Using React Components in Angular
- Spreading Props TypeScript with React and Styled Components
- Background image is not showing in Styled Components
- re export styled from styled components macro not working
- Styled Components with Typescript return type is any
- Avoid passing down props using Styled Components and Typescript
- Typescript not respecting components defaultProps
- styled components inheritance not working
More Query from same tag
- React redux not fetching data from API
- React: Authenticating on all Routes
- State arrays (not objects) and the spread operator
- ReactJS: HTML5 Canvas render error in iOS device (>= iPhone 8)
- Referencing a ReactJS object property using a string
- React Native Fetch on Android returns Network request failed
- Why is a horizontal line created, when user inputs whitespace?
- when i run npm install react-currency format . I'm getting the below error? what can i do?
- How to run to if statements simultaneously in javascript?
- What happens if I give same state to a react component
- On react-leaflet moving a few markers by useRef array
- Function component keeps rerendering over and over
- Cannot properly parse json string to JavaScript object
- How do I Display Images in React which are downloaded as Files & saved in a Folder on the Server with the Filepath stored in my Database?
- I am trying to create a box in React, and it is not working
- How to split and export the mysql code into other file and can be use anywhere in Reactjs
- Trying to map an array of objects in react
- Join JSX with JSX
- CSS Animation, onAnimationEnd Running only once
- Material UI Dialog close dialog from inner component
- Adding MsalAuthenticationTemplate for some routes causes all routes to require login
- React Select fails to focus inside Office UI Fabric Layer with TestCafe
- Setting a state variable has no effect
- What is the benefit importing React, {Component} instead of just React?
- sessionStorage.getItem null in react
- I can't align my components horizontally using React and CSS
- Where should I put images files in React project?
- Adding a <strong> Tag to the typed letters in Autocomplete field in React
- Failed prop type: The prop `setToken` is marked as required in `Login`, but its value is `undefined`
- Using @material-ui/core, how do I make a Slider where the track is divided into left and right with different colors?