Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More →
Socket
Sign inDemoInstall
Socket

react-html-props

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-html-props - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

11

package.json
{
"name": "react-html-props",
"version": "1.0.1",
"version": "1.0.2",
"author": "Justin Mahar <contact@justinmahar.com>",

@@ -26,3 +26,10 @@ "description": "Convenience TypeScript type definitions for all HTML element props.",

},
"keywords": [],
"keywords": [
"react",
"html",
"props",
"prop types",
"typescript",
"react html props"
],
"dependencies": {},

@@ -29,0 +36,0 @@ "peerDependencies": {

8

README.md

@@ -26,3 +26,3 @@ <h2 align="center">

- **🛩ī¸ Convenience TypeScript HTMLAttributes prop types for all HTML elements**
- Easily reference props for any HTML element with shorthand like `DivProps` instead of `React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>`.
- Easily reference props for any HTML element with shorthand like `DivProps`.

@@ -43,8 +43,6 @@ ## Installation

Use the [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#object_destructuring) technique below to unpack `children` from the rest of `div`'s props.
```tsx
import { DivProps } from "react-html-props";
export const PandaBearComponent = ({ children, ...divProps }: DivProps): JSX.Element => {
export const MyComponent = ({ children, ...divProps }: DivProps): JSX.Element => {
return <div {...divProps}>{children}</div>;

@@ -54,2 +52,4 @@ };

Here we are using [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#object_destructuring) to unpack `children` from the rest of `div`'s props.
### Mixing With Custom Props

@@ -56,0 +56,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc