New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

xshape

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xshape

[![npm version](https://badge.fury.io/js/xshape.svg)](https://badge.fury.io/js/xshape.svg) [![npm download](https://img.shields.io/npm/dm/xshape.svg?style=flat-square)](https://www.npmjs.com/package/xshape)

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

xshape

npm version npm download

Install

NPM

npm install xshape

Usage

import { useXShape, XShapeStage, URLImage, createRootMachine } from 'xshape';

// url is optional
// data format see: https://github.com/tony40508/xshape/blob/main/public/mockData.json
const rootMachine = createRootMachine('initial-shape-data-url');

function App() {
  const {
    componentProps,
    // other props see: https://github.com/tony40508/xshape/blob/main/src/App.tsx
  } = useXShape(rootMachine);

  return (
    <XShapeStage
      {...componentProps}
      // enable to configure finish condition in limited options
      // see: https://github.com/tony40508/xshape/blob/main/src/utils/types.d.ts
      handleMouseDown={(e) => {
        componentProps.handleMouseDown(e, 'ctrl+click');
      }}
    >
      {/* URLImage is optional */}
      <URLImage url="background-image-url" />
    </XShapeStage>
  );
}

Run the example locally

npm install
npm run dev

Keywords

react

FAQs

Package last updated on 16 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts