score:0
You can use React-Markdown:
import { IntrinsicElements } from "react-markdown/src/ast-to-react";
interface InputContainerProps1 extends Partial<IntrinsicElements['div']>{
minWidth?: string | number
}
The Partial Class constructs a type with all properties of IntrinsicElements['div'] set to optional. Under the hood the Partial interface looks like this:
type Partial<T> = { [P in keyof T]?: T[P]; };
score:3
What worked for me was defining the type before hand
type SpanProps = JSX.IntrinsicElements['span']
interface IconProps extends SpanProps {
weight?: string
src: string
}
Source: stackoverflow.com
Related Query
- How to extend JSX.IntrinsicElements['div']? TS2499
- How to extend JSX types for Typescript?
- How to repeat an element n times using JSX and Loadsh
- How can I return multiple lines JSX in another return statement in React?
- In JSX how do I set a className as string + {prop}
- How can I interpolate JSX with an expression in a string?
- How to comment JSX code out in .js files in VSCode?
- How to add custom html attributes in JSX
- How to concatenate two JSX fragment or variables or string and component (in Reactjs)?
- React.js: how to decouple jsx out of JavaScript
- In Sublime Text 3, how do you enable Emmet for JSX files?
- How to concatenate JSX components in React Native
- How to extend styled component without passing props to underlying DOM element?
- How to extend a React component?
- How to loop over a number in React inside JSX
- How to auto indent jsx in VSCode
- How to concatenate JSX elements into an array?
- How can one extend React types to support html attributes as props?
- How to render (print) JSX as String?
- How to allow react-native to enable support for JSX (extension) files
- How to do CSS :hover function in JSX ?
- how to render multiple children without JSX
- How to specify class on a JSX node?
- How to add a comma in array.map after every element except last element in React JSX
- How to extend a Joi schema?
- How to have a external JSON config file in react jsx
- How to extend props for Material-UI components using Typescript?
- how to use escape characters in JSX
- How to get Emmet to generate a custom JSX attribute without quotes
- How to loop through object in JSX using React.js
More Query from same tag
- How to convert FormData into Object then JSON.stringify that?
- React Js custom accordion, open one item at the time
- "× TypeError: this.props.tracks.map is not a function" why this happen?
- Initial value in useState hook
- SVG use tag and ReactJS
- Java Script: Setting Value to the Object by id, where id is last letter of Object
- Securely storing auth token in React Frontend
- React Native Data Types
- How to know which button is clicked when there are multiple buttons (React)
- Creating mixed Bar Chart with ReactJS using recharts or react-chartjs-2
- How to customize a component on React Bootstrap
- How do I get the object from my api to display the api content on the page?
- react-typeahead: Get the id of the element selected
- Scroll to the bottom of a scrollable div in react
- Handle onChange on input type=number
- How to pass Authorization token from ReactJS to NodeJS request
- Require file with a variable in React JS
- How to set and access values of nested array objects in React state using useState hook?
- Please I'm a newbie to using pug with reactjs, so what should I do when I face this bug, ERROR in utils.getReturnPropertyAndNode is not a function?
- React router Prompt history push query params change Prompt location
- Resolve Relative Path from node_modules to Dist folder with Webpack
- HOC react redux firebase. (Error: Firebase storage is required to upload files)
- PrevProps giving same value as props
- Dont understand how to pass props to routes
- React-Select: How to maintain search-ability while passing HTML to the label value in options
- How to access a Global variable in React JS functional component?
- How to set active link in Navbar using Nav.Link and React Router?
- Fetch in React Uncaught (in promise)
- Making theme available in HOC component
- which is correct way to use navigate dependency in useEffect