npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-another-dialog

v0.1.41

Published

Modal dialog component aiming for API simplicity but still covering common more complex use cases.

Downloads

26

Readme

react-another-dialog documentation

Build upon (https://github.com/yogaboll/react-npm-component-starter)

Modal dialog component aiming for API simplicity but still covering common more complex use cases.

  • package name: react-another-dialog
  • main: lib/AnotherDialog.js
  • version: 0.1.41
  • date: 2018/06/18 15:33:45
  • license: MIT
  • author: tapsaman

*** WORK IN PROGRESS *** undefined


In file AnotherDialog.jsx

class AnotherDialog

React-component for building your dialog element in.

Properties

Name | Type | Default | Description -----|------|---------|------------ title | string | n/a | Shown title (optional). subtitle | string | n/a | Shown subtitle. Included HTML will be rendered (optional). query | Array | n/a | Array of properties to render AnotherDialogInput-objects with OR ready-made input components (extending AnotherDialogInput) verification | bool/string | false | If true, verificate response before onSuccess, after onPostValidation. Give a string to define the verification question (default: "Are you sure to proceed?"). animateIn | function | n/a | Function to animate in the dialog the way you wish.Run as animateIn(formElement, maskElement) animateOut | function | n/a | Function to animate out the dialog the way you wish.Run as animateOut(formElement, maskElement, after)Note: Run the 'after'-function when done! onSuccess onCancel onFinish onPostValidate | function | n/a | Run with parameters dialogOutput and afterPostValidate callback.Response object: { pass: _bool_, message: _string_ }Must either return the response object or run afterPostValidate with it as the first parameter. options | array | [{ type:"submit", value:"OK" },{ type:"cancel", value:"Cancel" }] | Customize the main buttons. Additionals can be included:{type: "button", value: "Example", onClick: function() {...}} closeOnMaskClick | bool | true | If true, cancel dialog on click outside the form (on .a-dialog-mask) noMask | bool | false | floating | bool | true | If true, float form in the screen center

Given React-children are rendered after title, before subtitle and query.

onPostValidate response properties

Common for inputs and form. Name | Type | Default | Description -----|------|---------|------------ message | string | - | Output as main message, pass | bool | - | True if validation passes, false if fails. Undefined if no change (e.g. with a "Loading..." message).

Only for forms. Name | Type | Default | Description -----|------|---------|------------ verificate | bool | - | If true, verificate response with OK / Cancel (verification message is given as message). afterVerificate | function | - | If defined, run after verification. Otherwise runs onSuccess.

undefined


In file AnotherDialogInput.jsx

class AnotherDialogInput

Base class for AnotherDialog-input React-components.

Properties

Name | Type | Default | Description -----|------|---------|------------ title | string | n/a | Question header (optional). name | string | n/a | Name of output value type | string | "hidden" | "text"/"password"/"check"/"number"/"radio"/"select"/"date"/"daterange"/"group"/"addable"/"hidden" kind | string | "hidden" | alias of type init | string/number | n/a | initial value or child amount for "addable" max | number | n/a | max value for "num", length for "text"/"password" or child amount for "addable" min | number | n/a | min value for "num", length for "text"/"password" or child amount for "addable" minDiff | number | 0 | minimum start/end date difference for "daterange" titles | array | ["Start date", "End date"] | titles of each date input for "daterange" range | string | n/a | range string, overrides min/max (e.g. "0-5") test | function | n/a | test "text"/"password" value with opt | array | n/a | option values for "radio"/"select" (use null for disabled options / option headers) optTitles | array | n/a | option titles for "radio"/"select" children | array | n/a | inputs for "addable"/"group"