0.0.15 • Published 1 year ago

@astii/dialog v0.0.15

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@astii/dialog

NPM version NPM downloads

Install

$ yarn add @astii/dialog

Usage

import React, { useState } from "react";
import Dialog from "@astii/dialog";
export default () => {
  const [open, setOpen] = useState<boolean>(true);
  return (
    <Dialog
      title="dialog"
      width={500}
      open={open}
      draggable={true}
      inside={true}
      onClose={() => setOpen(false)}
    >
      <h1>dialog</h1>
    </Dialog>
  );
};

Options

interface DialogProps {
  title?: React.ReactNode | string;
  /**
   * @default 1024
   */
  width?: CalStyle;
  open?: boolean;
  children?: React.ReactNode;
  extra?: React.ReactNode;
  footer?: React.ReactNode;
  /**
   * dialog can be drag with handler
   * @default false
   */
  draggable?: boolean;
  /**
   * dialog can be drag within area
   * @default false
   */
  inside?: boolean;
  /**
   * close when click mask
   */
  maskClosable?: boolean;
  contentClassName?: string;
  closeIcon?: React.ReactNode;
  onClose?: () => void;
}

LICENSE

ISC

0.0.15

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.12

1 year ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago