New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

messa-resizer

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

messa-resizer

React resizer component.

  • 0.0.62
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-69.23%
Maintainers
1
Weekly downloads
 
Created
Source

Resizer Component (Experimental) [WIP]

storybook: https://resizer.messafilip.now.sh

storybook gif

Main Scripts

add to your a project

yarn add messa-resizer

install dependencies

yarn install

run storybook:

yarn storybook

run all test: (flow & eslint & jest)

yarn test

build library:

yarn build

Examples

Here is a minimal example. (without styles)

import React from "react";
import { Resizer } from "messa-resizer";

const App = () => {
  return <Resizer>Resizer component</Resizer>;
};

Component props

NameTypeDefaultDescription
childrenReact.NodeThe content of the Resizer.
styleStyleObjectThe root container's styles.
classNamestringThe root container's classNames.
defaultWidthnumberThe defaultWidth of the Resizer.
defaultHeightnumberThe defaultHeight of the Resizer.
maxHeightnumberInfinityThe maxHeight of the Resizer.
minHeightnumber20The minHeight of the Resizer.
maxWidthnumberInfinityThe maxWidth of the Resizer.
minWidthnumber20The minWidth of the Resizer.
handlersStylesHandlersStylesThe handlebars' inline-styles.
handlersClassNamesHandlersClassNamesThe handlebars' inline-styles.

type HandlersStyles = {|
  +bottom?: StyleObject,
  +right?: StyleObject,
  +"bottom-right"?: StyleObject
|};
type HandlersClassNames = {|
  +bottom?: string,
  +right?: string,
  +"bottom-right"?: string,
|};

TODOs

  • the defaultHeight and defaultWidth should handle string ('auto', '12px', '100%', etc...)
  • add E2E tests (cypress or Puppeteer)
  • The Handlebar component should be able to have children
  • improve unit tests
  • improve styles extend API
  • continuous integration
  • Add handlebars for left and top

Requirments

  • Use ES6 (with Flow) or TypeScript
  • Third-party apps should be able to modify styles
  • The example should work in Chrome, Firefox and Safari
  • Use React
  • Add unit tests (each component should be covered)

Keywords

FAQs

Package last updated on 25 Oct 2019

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

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