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

@highlight-ui/dialog

v9.3.3

Published

This is Dialog component used in Personio

Downloads

4,691

Readme

npm personio.design storybook.personio.design

@highlight-ui/dialog

Installation

Using npm:

npm install @highlight-ui/dialog

Using yarn:

yarn add @highlight-ui/dialog

Using pnpm:

pnpm install @highlight-ui/dialog

In your (S)CSS file:

@import url('@highlight-ui/dialog');

Once the package is installed, you can import the library:

import { Dialog } from '@highlight-ui/dialog';

Usage

import React, { useState } from 'react';
import { Dialog, Modal } from '@highlight-ui/dialog';

export default function DialogExample() {
  return (
    <div>
      <Button
        variant="emphasized"
        onClick={() => {
          setIsDialogOpen(true);
        }}
      >
        Show dialog
      </Button>

      <Dialog
        title={title}
        open={isDialogOpen}
        size="small"
        variant="default"
        primaryButton={{
          buttonLabel: 'Confirm',
          buttonState: 'default',
        }}
        secondaryButtons={[
          {
            buttonLabel: 'Cancel',
            buttonState: 'default',
          },
        ]}
      />
    </div>
  );
}

Props 📜

Dialog

Dialog props extend the Modal props below

| Prop | Type | Required | Default | Description | | :----------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :-------- | :------------------------------------------------------------------------------------------------------ | | title | string | Yes | | Sets the title of the dialog | | labelledBy | string | No | | Sets the reference to the aria-labelledby attribute. It'll add a default value if not present. | | describedBy | string | No | | Sets the reference to the aria-describedby attribute | | variant | 'default', 'destructive' | No | default | default is used for regular interactions and destructive is usually for destructing (e.g. deletion) | | size | 'small', 'medium', 'large' | No | small | Sets the width of the dialog | | primaryButton | DialogActionButtonProps | No | | Configures the label/icon and behaviour of the primary action button | | secondaryButtons | DialogActionButtonProps[] | No | | Configures the label/icon and behaviour of the secondary action buttons |

Modal

| Prop | Type | Required | Default | Description | | :-------------------- | :------------ | :------- | :------ | :------------------------------------------------------ | | open | boolean | Yes | false | Specifies whether the Dialog is mounted and displayed | | className | string | No | | Allows providing a custom class name | | initialFocusElement | HTMLElement | No | | Specifies an initial focused HTML element | | onRequestToClose | () => void | No | | Gets called when the close or cancel button is pressed | | onClose | () => void | No | | Gets called after the Dialog is closed | | onOpen | () => void | No | | Gets called after the Dialog is opened |

Contributing 🖌️

Please visit personio.design for usage guidelines and visual examples.

If you're interested in contributing, please visit our contribution page.