react-html-props
Advanced tools
Comparing version 1.0.29 to 1.0.30
{ | ||
"name": "react-html-props", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"author": "Justin Mahar <contact@justinmahar.com>", | ||
@@ -5,0 +5,0 @@ "description": "Convenient TypeScript types for all React HTML props.", |
@@ -58,2 +58,4 @@ <h2 align="center"> | ||
> Note: `DivProps` is equivalent to `React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>` | ||
In this example, we're using `className`, `style`, and `onClick` on our own component since it supports all `div` props: | ||
@@ -73,6 +75,4 @@ | ||
> Note: `DivProps` is equivalent to `React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>` | ||
Types are available for all HTML props. See below for a table containing all supported types. | ||
Props are available for all HTML elements. See below for a table containing all supported types. | ||
## Unpacking Attributes | ||
@@ -114,3 +114,3 @@ | ||
(And yes, a group of kittens is called a "kindle") | ||
(Yes, a group of kittens is called a "kindle") | ||
@@ -210,3 +210,3 @@ ## Included HTML Element Props | ||
For example, you can use `DivPropsWithoutRef` for a `div` without a React `ref`, and is equivalent to `React.HTMLAttributes<HTMLDivElement>`. | ||
For example, you can use `DivPropsWithoutRef` for a `div` without a React `ref`. `DivPropsWithoutRef` is equivalent to `React.HTMLAttributes<HTMLDivElement>`. | ||
@@ -213,0 +213,0 @@ > A `ref` may not always be desirable, so it remains optional to give you flexibility. For instance, components returned by [`styled-components`](https://styled-components.com/) may not support React's `ref` type. |
49694