jaw9c / react-interactive-inspect

Inspect element component for React.

Home Page:https://jaw9c.github.io/react-interactive-inspect/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-interactive-inspect

Inspect element component for React. Current funcionality provides the XPath of the element selected, based for the use case of an standard (non-tech) user to be able to select elements to otherwise process.

NPM JavaScript Style Guide

Demo

https://react-interactive-inspect.netlify.com

Install

npm install --save react-interactive-inspect
yarn add react-interactive-inspect

Usage

import * as React from "react";

import InteractiveXPathSelector from "react-interactive-inspect";

const htmlData = "<html><ul><li>1</li><li>2</li><li>3</li></ul></html>";
const cssData = "ul { paddingBottom: 10px }";

const Example: React.FC = () => (
  <InteractiveXPathSelector
    html={htmlData}
    css={cssData}
    onSelect={path => console.log(path)}
  />
);

License

MIT © jaw9c

About

Inspect element component for React.

https://jaw9c.github.io/react-interactive-inspect/


Languages

Language:JavaScript 73.2%Language:TypeScript 16.2%Language:CSS 7.2%Language:HTML 3.5%