1.0.11 • Published 9 months ago

@hudoro/dialog v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Hudoro Dialog

Hudoro Dialog is a strict and customizable dialog component for web development projects, designed for simplicity and adherence to strict design guidelines.

Screenshots

App Screenshot

Package instalation

Instal package using pnpm

  pnpm add @hudoro/dialog

Instal package using yarn

  yarn add @hudoro/dialog

Instal package using npm

  npm i @hudoro/dialog

import package to your project

  import {Dialog, DialogBody, DialogFooter, DialogTitle} from '@hudoro/dialog'

Usage/Examples (you can combine using any package hudoro)

import {Dialog, DialogBody, DialogFooter, DialogTitle} from "@hudoro/dialog";
import {Button} from "@hudoro/button";
import {Box} from "@hudoro/box";
import {Text} from "@hudoro/text";

const App = () => {
  const [show, setShow] = useState(false);

  const toggleShow = () => {
    setShow((prev) => !prev);
  };
  return (
    <div>
      <Button warning onClick={toggleShow}>
        show
      </Button>
      <Dialog isShow={show} onHide={toggleShow}>
        <DialogTitle danger>Are you sure dani sooo tamvan?</DialogTitle>
        <DialogBody>
          <Text
          //any text props goes here
          >
            dani is so so so tamvan
          </Text>
        </DialogBody>
        <DialogFooter>
          <Box
          //any box props goes here
          >
            <Button link onClick={toggleShow}>
              no no
            </Button>
            <Button danger>Yes Delete this</Button>
          </Box>
        </DialogFooter>
      </Dialog>
    </div>
  );
};

Props @hudoro/dialog

Props that you can pass to <Dialog {...props}>

Prop NameTypeValueDefaultrequired
childrenReactNodeReactNodeReactNodetrue
isShowbooleanfalse / truefalsetrue
onHide() => void() => {your logic}() => {}true

Props that you can pass to <DialogTitle {...props}>

Prop NameTypeValueDefaultrequireddescription
childrenReactNodeReactNodeReactNodetrue""
infobooleanfalse/truefalsefalsesvg with type info will appear next to the left title
successbooleanfalse/truefalsefalsesvg with type success will appear next to the left title
dangerbooleanfalse/truefalsefalsesvg with type danger will appear next to the left title

Props that you can pass to <DialogBody {...props}>

Prop NameTypeValueDefaultrequireddescription
childrenReactNodeReactNodeReactNodetrue""

Props that you can pass to <DialogFooter {...props}>

Prop NameTypeValueDefaultrequireddescription
childrenReactNodeReactNodeReactNodetrue""
1.0.11

9 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.10

1 year ago

1.0.5

1 year ago

1.0.2

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

0.0.1-beta.3

1 year ago