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

@hixme-ui/modal

v2.2.0

Published

hixme-ui Modal component

Downloads

45

Readme

Modal

npm i --save @hixme-ui/modal

View it live

Usage

import Modal from '@hixme-ui/modal'

<Modal
  dialog 
  medium
  title='All your base are belong to us' 
  confirmLabel='Get down!' 
  cancelLabel='Eh, maybe not...'
>
  {/* Modal content here */}
</Modal>

Props

| Property | Type | Value | Required | Description | | ----------------------- | ---------- | ---------------- | -------- | --------------------------------------------------------------- | | backgroundColor | string | N/A | Yes | Easy way to change the modal color | | hideCloseButton | boolean | false | Yes | Hide the default close button | | style | object | N/A | No | Override modal styles | | title | string | N/A | No | Modal title header | | zIndex | number | 1001 | No | Modal z-index value | | small | boolean | false | No | Modal with 568px max-width | | medium | boolean | false | No | Modal with 800px max-width | | large | boolean | false | No | Modal with 1024px max-width | | middle | boolean | false | No | Vertically align content in the center of the modal | | bottom | boolean | false | No | Vertically align content on the bottom of the modal | | contentCenter | boolean | false | No | Horizontally align content center | | contentEnd | boolean | false | No | Horizontally align content right | | contentPadding | string | null | No | Padding for the modal content | | cancelProcessing | boolean | false | No | Show processing state on cancel button | | cancelSubmittingText | string | N/A | No | Text shown on the cancel button when cancelProcessing is true | | cancelHandler | function | defaultClose() | No | When dialog = true, function called on cancel | | cancelLabel | string | 'Cancel' | No | When dialog = true, label on the cancel button | | confirmProcessing | boolean | false | No | Show processing state on confirm button | | confirmSubmittingText | string | N/A | No | Text shown on the confirm button when confirmProcessing is true | | confirmHandler | function | N/A | No | When dialog = true, function called on confirm | | confirmLabel | string | 'Ok' | No | When dialog = true, label on the confirm button | | dialog | boolean | false | No | Show dialog modal | | errorDialog | boolean | false | No | Show error dialog modal |

Styling

The default style is a full screen modal. You can specify small, medium, or large to render a more traditional modal style. Any of the preset modal styles can be overwritten by providing the <MrModal /> component with a style object.

style: {
  content: {
    ...contentStyles
  },
  overlay: {
    ...overlayStyles
  },
}